[v4] Some generated tailwind CSS variables are not prefixed. #17195
Replies: 2 comments 7 replies
-
Hey! Yeah so it's only theme variables which are prefixed — stuff like Is there a specific issue you are running into because of these not being prefixed with your custom prefix? |
Beta Was this translation helpful? Give feedback.
-
+1. I would rather both local and global variables to be prefixed to avoid any potential issues. For instance, once used an external component its Tailwind styles applied under a body class |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What version of Tailwind CSS are you using?
v4.0.14
What build tool (or framework if it abstracts the build tool) are you using?
Latest Tailwind Play
What version of Node.js are you using?
Latest Tailwind Play
What browser are you using?
Chrome
What operating system are you using?
macOS
Reproduction URL
Tailwind Play: https://play.tailwindcss.com/SLkLs6VhC4?file=css
Describe your issue
When using a prefix, I expect every tailwind generated CSS variable to use this prefix. This does not seem to be the case for certain utility classes, and can cause existing CSS variables to override the tailwind generated CSS variables.
Example:
If I set the prefix to
foo
,foo:translate-y-[50px]
will generate the following CSS:I expect
foo:translate-y-[50px]
to generate something like:Beta Was this translation helpful? Give feedback.
All reactions