-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add @prefix
at-rule for prefixing classes
#100
Conversation
I love this idea, this would also close #92! Also, why use an at-rule rather than a configuration option? |
Maybe have both? |
Right now the config file doesn't contain any real "settings" or anything so to speak; it's more of a style guide or a definition of your design system. Adding this there would make it the first time we've added that sort of configuration to that file and I'm not convinced I want to start mixing those two types of configuration in the same place. Open to discussing it though; it would likely affect #99 as well, and any other proposals about "settings" like this, like tailwindlabs/discuss#27. |
Mixing the style stuff with possible setting might indeed not be a good idea. |
A different setting could be to control the format of the responsive prefixes (like mentioned in tailwindlabs/discuss#27), but also to choose whether to use that as a prefix or suffix. Maybe settings to control LTR/RTL stuff. |
After a bunch of discussion I think we're going to do this in the config file. Gonna let this hang open until we get that implemented though. |
Closing this in favor of the config-based approach in #183. |
This PR adds a new custom
@prefix
at-rule which works as a decorator for prefixing any nested class definitions:This makes it easy to generate all of Tailwind's utilities with a user-provided prefix to avoid collisions with any existing CSS they are using