Documentation does not reflect actual implementation
Open
docs
- Dominant language
- JavaScript
- Stars
- 7.1k
- Forks
- 386
- PR merge metrics
- No merged PRs in 30d
Description
__Expected behavior:__
Refering to the [docs](https://cssinjs.org/jss-api/?v=v10.7.1#add-a-rule-dynamically), one should be able to use it like so:
```
const rule = sheet.addRule({ … })
document.body.innerHTML = `Button`
```
but `rule.className` is undefined.
I have had a look into the source and could not find any trace for the mentioned »className« property. Right now I am using `rule.id`. That is working somehow, but not included in the typings - so: `(rule as any).id` is what I am using. But that feels hackish and not to be the intended way.
So how is it intended to be used?
__Versions:__
- jss: ^10.7.1
Contributor guide
Assessment
This issue has not been assessed yet.