Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn about potential mistakes during development #2

Open
5 tasks
kripod opened this issue May 17, 2020 · 0 comments
Open
5 tasks

Warn about potential mistakes during development #2

kripod opened this issue May 17, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@kripod
Copy link
Owner

kripod commented May 17, 2020

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 ESLint plugin for keeping the recommended pseudo selector order #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 ESLint plugin for keeping the recommended pseudo selector order #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.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant