sheet.addRule API does not work as documented
Open
complexity:low
docs
- Dominant language
- JavaScript
- Stars
- 7.1k
- Forks
- 386
- PR merge metrics
- No merged PRs in 30d
Description
Hi, first thanks for great JSS tool.
I have a problem with ```sheet.addRule```. Following example for already attached ```sheet``` (based on API documentation at https://github.com/cssinjs/jss/blob/master/docs/js-api.md) does not work for me:
```
const rule = sheet.addRule({ padding: 20})
alert (rule.className)
```
1. ```rule.className``` is undefined
2. rule is not added to DOM
When I use ```sheet.addRule('xxx', { padding: 20}); alert (sheet.classes.xxx)```, all is working as expected.
I am using JSS ver. 9.0.0 and latest Chrome.
Thank you for clarification.
Contributor guide
Assessment
This issue has not been assessed yet.