chromaui / storybook-addon-pseudo-states

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

feat: add parameter to configure selector limit #60

Open YellowKirby opened 1 year ago

YellowKirby commented 1 year ago

Frameworks such as Tailwind can introduce stylesheets with a large number of selectors, and at the moment this addon has a hard 1000-selector limit before it stops iterating.

This PR makes that limit configurable, with the caveat that it might hurt performance. Since we're primarily using this addon for visual regression testing I'd much rather have completeness over performance.

I did notice that this was discussed a bit here so I'd be happy to look into alternative solutions if that comment is still applicable.

Scurio commented 1 year ago

We are also running into this problem with a larger framework and would like to put a quite high limit, performance seems to be fine enough for us with a higher limit (local testing).