chromaui / storybook-addon-pseudo-states

CSS pseudo-classes for Storybook
MIT License
88 stars 28 forks source link

Pseudo classes are generated when pseudo is excluded #31

Open tobi-or-not-tobi opened 2 years ago

tobi-or-not-tobi commented 2 years ago

When a pseudo selector is used in an exclusion, i.e. :not(:hover), it should not be used to generate a pseudo state class.

We've seen this in various rules:

:not(:hover) { ... } foo > bar :not(:hover) { ... } foo > bar :not(item:hover) { ... }

The regex to match those pseudo's should be improved to avoid the excluded pseudo's.