Warn in dev when function values or values in function rules return strings containing !important
Open
complexity:low
enhancement
- Dominant language
- JavaScript
- Stars
- 7.1k
- Forks
- 386
- PR merge metrics
- No merged PRs in 30d
Description
Per my failure to read the docs resulting in cssinjs/react-jss#225, since !important only works with array syntax in dynamic rules, as the underlying call to [`style.setProperty`](https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleDeclaration/setProperty) expects `priority` as a separate argument, when running in a dev environment we should log a warning, something like:
```
Warning: react-jss detected use of "!important" in a string returned from a dynamic .
This will prevent your style from being properly applied. Please use array syntax instead.
http://cssinjs.org/json-api?v=#support-of-important
```
Contributor guide
Assessment
This issue has not been assessed yet.