chromaui / storybook-addon-pseudo-states

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

Avoid invalid CSS generation for styles using vendor pseudo-elements #120

Closed m-akinc closed 4 months ago

m-akinc commented 4 months ago

Previously we were only handling the ::-webkit-scrollbar-thumb and ::-webkit-slider-thumb vendor pseudo-elements. This change generalizes the code to handle any vendor-specific pseudo-elements (i.e. ::-webkit-*, ::-moz-*, and ::-ms-*) the same way. Apparently there are also some old, pre-Webkit Opera CSS elements (starting with -o-), but I'm not sure if there are any such pseudo-elements. In any case, it is unlikely anyone is using them, if there are.

Made sure the unit tests cover all these patterns.

ghengeveld commented 4 months ago

Yeah, I think it's a good improvement to generalize things. Opera isn't among Storybook's nor Chromatic's supported browsers, so I consider that out of scope.

github-actions[bot] commented 4 months ago

:rocket: PR was released in v3.1.1 :rocket: