Skip to content

Is Shipping Pseudo-Selectors in Sprinkles an Anti-Pattern or a Worst-Case Scenario? #1478

Answered by radnan
Hong-been asked this question in Q&A
Discussion options

You must be logged in to vote

i would say this is an anti-pattern and vanilla extract is not the right tool for this job

with sprinkles you spit out a pre-compiled CSS with every possible combination and in runtime the decision is made when to use which combination.

but if you need more flexibility here then something like panda css might be better suited. in that tool there is build time logic that determines which combinations are actually used and only spits out the css for that - which i guess is a more truer CSS-in-JS solution.


in our design system we used sprinkles just to include tokenized values of our styles (spacing, colors, border radius, box shadow, etc.) and combined it with responsive breakpoint/screen …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Hong-been
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants