Custom variants? #3548
heather-loll
started this conversation in
Ideas
Replies: 0 comments
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Earlier, I was adding a "compact" layout to my app and realized that there isn't really an easy way to do that in tailwind (to my knowledge). That got me thinking if there was a way to achieve this with a tailwind plugin, but I couldn't find immediate resources to answer that question.
My proposal is custom tailwind variants that are declared in the config file. They would work exactly like the
dark
class, where all children would receive new styles. This could also be helpful for "activating" elements, such as a modal (defaultopacity-0 pointer-events-none
, and a triggered versiontriggered:opacity-100 triggered:pointer-events-auto
).Thoughts? I think this has many uses and would be a very helpful addition to tailwind.
Beta Was this translation helpful? Give feedback.
All reactions