Jss: [jss-nested] Keyframes cannot be added

Created on 21 Feb 2018  路  3Comments  路  Source: cssinjs/jss

Simply adding this keyframe as a rule:

sheet.addRule('foo', {
  '@keyframes test': {
    from: { opacity: 0 },
    to: { opacity: 1 },
  },
})

throws following error

TypeError container.addRule(...).addRule is not a function

See this CodeSandbox for repro and full error stack.

question

Most helpful comment

So how did you fix it?

All 3 comments

Oops, thanks.

So how did you fix it?

Was this page helpful?
0 / 5 - 0 ratings