Replies: 1 comment 2 replies
-
Hey! We have an unstable experimental option for this right now that you can play with if you like, just need to pass a third arg to addVariant('rfs', () => { ... }, { unstable_stack: true }) We use this internally for the dark mode and motion-safe/reduce variants. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I created a pretty straight forward plugin that adds a custom
rfs
variant. I need this custom variant to behave like theresponsive
anddark
variants do. Meaning, I also need classes to be generated for all the state variants on top of the custom variant.In my
tailwind.config.js
:This generates classes like this:
I also need state variant classes to be generated on top of the
rfs
variant like this:When source diving Tailwind's code, I came across this file that seems to handle stacking the variants.
I'm not sure if there's an easy way to make this work inside a variant plugin?
Beta Was this translation helpful? Give feedback.
All reactions