Closed msnider closed 6 years ago
Too bad we have no tests here, I trust you have tested this. On the other note, as a micro optimization I would use name[0] === '@'
, it will be faster
Ok, I updated to your recommendation and added a quick test.
lgtm
released 2.1.0
🎉
It seems to me that rules including @global, @keyframes, @charset, @font-face, and @import should be passed to JSS directly without running generateClassName on them. This means @keyframes can be used similar to how they are described in the JSS documentation: https://github.com/cssinjs/jss/blob/master/docs/json-api.md#keyframes-animation
An alternative would be to more closely replicate aphrodite and look at the styles and generate the appropriate rules when calling the css method (probably would more than double the LOCs).