Skip to content

Warn about potential mistakes during development #2

@kripod

Description

@kripod

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.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions