Allow empty styles at runtime
- Dominant language
- JavaScript
- Stars
- 7.1k
- Forks
- 386
- PR merge metrics
- No merged PRs in 30d
Description
For dynamic styles/rules we need to allow them render empty in order to be linked and so props can be defined later. Right now the logic allows empty rules only if link: true option is used, which works fine.
Though, a more straight forward way would be to always allow empty rules. We need to skip empty rules only when we do SSR or build-time extraction in order to remove unused CSS.
Empty rules could be generated when a function which returns styles, but, based on some condition, returns an empty value and user is unaware. In general it is a quite rare case and gave us headaches with dynamic cases where rules are generated by Observables and evtl. by functions in the future.
Contributor guide
Assessment
This issue has not been assessed yet.