Warn about potential mistakes during development
kripod opened this issue · 0 comments
kripod commented
Motivation
Similarly to how Emotion and Styled Components work, warnings should be emitted to the console during development.
Details
Cases to handle:
- Invalid value passed to a
content
property. (See: Emotion – This may be checked statically by linting, as proposed in #11.) - Too much CSS is injected dynamically from the same place. (See: Styled Components – This might only be handled by view library bindings.)
- Non-atomic pseudo selector is being used outside
selectors
, targeting e.g. data attributes or nth elements. - Advanced selectors not starting with "&". – (This may be checked statically by linting, as proposed in #11.)
- Inconsistent conditional rule order (e.g. media queries in mixed order instead of a mobile-first or desktop-first approach) – (This should probably be checked statically by linting.)