Replies: 2 comments 2 replies
-
Are you experiencing any problems with the hex values? I assume they should be equivalent to the source values. I assume they are converted in production because minification and transpilation is run only in production and hex values would be shorter. |
Beta Was this translation helpful? Give feedback.
-
I can't yet say if there are problems with hex. If I remember correctly, in Tailwind v3, there was a way to disable the color minification, but I couldn't do that here because I was using the Vite plugin. Should I switch to postcss config, or is there a way to configure/disable this exact behavior? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
What version of Tailwind CSS are you using?
v4.1.7
What build tool (or framework if it abstracts the build tool) are you using?
@tailwindcss/vite: 4.1.7, vite: 6.3.5
What version of Node.js are you using?
not relevant
What browser are you using?
Brave
What operating system are you using?
MacOS
Reproduction URL
https://stackblitz.com/edit/vitejs-vite-fjmrwyje
Describe your issue
I installed
tailwind
and thevite
plugin, then configured the vite plugin insidevite.config.ts
file.When defining color tokens with the
@theme
helper and usingHSL
orHSLA
my colors are converted toHEX
after build.If I remove the vite plugin from the config.ts file and rebuild, the colors inside dist/minified.css are preserved.
This happens with
hsl
,hsla
,rgb
.For the
oklch
it just converts the regular numbers to percentages which is fine.Steps to reproduce
static
keyword or ommit it and apply the color token classnames directly inside the jsx@tailwindcss/vite
NOTE:
This only happens on
production
mode, notdev
Beta Was this translation helpful? Give feedback.
All reactions