Adding a custom prefix for tailwind 4.0 #16046
DennisVulders
started this conversation in
Ideas
Replies: 2 comments 2 replies
-
@DennisVulders how do you set the prefix? |
Beta Was this translation helpful? Give feedback.
0 replies
-
@DennisVulders Just tested your theory and this is working for me.
|
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
-
Hey All,
We are currently upgrading our code from tailwind 3 to tailwind 4 and we (like many others) use the "tw-" prefix. While after searching for a while i did find out that prefixes can be added but it would then be used as tw:width-full for example. To make tailwind 4 more backwards compatible and in my personal opinion i think the readability of the "tw:" is worse than the "tw-" prefix, since the classes themselves are also kebab-case.
I know that we can still use the old config to do this, but it would be ideal if it is possible to use:
@import "tailwindcss" prefix(tw-);
So that we can all use tw-w-full etc.Hopefully this can be a feature in a future release of tailwind 4.x 🙂
Beta Was this translation helpful? Give feedback.
All reactions