Curious Ruleset Collision #1792
neilchaudhuri
started this conversation in
General
Replies: 2 comments 3 replies
-
Incidentally, this worked as well:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Instead of |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In our design system, we categorize buttons two ways:
As a result there are four kinds of buttons.
Using postcss-nested, I have this setup:
This produces the following error:
@apply cannot be used with .bg-primary-brand because .bg-primary-brand is included in multiple rulesets.
I can sort of see the problem here since there is potential for confusing recursion. While I can eliminate the error at the bottom by enumerating all the block elements (e.g. div.bg-primary-brand, main.bg-primary-brand, article.bg-primary-brand, etc.), what's the proper way to address these four composite categories in a way that doesn't cause problems?
Beta Was this translation helpful? Give feedback.
All reactions