-
What version of Tailwind CSS are you using? v4.1.13 What build tool (or framework if it abstracts the build tool) are you using? None/Tailwind CLI What version of Node.js are you using? v24.5.0 What browser are you using? N/A, checking CSS output What operating system are you using? macOS Reproduction URL https://github.com/danbisso/tailwindbug Describe your issue I'm using one utility class in the HTML,
I see the utility class
However, the issue is that when I change the utility class in my HTML, from say
I would expect the variables to also get cleaned up since this is a full rebuild and not an incremental one (I'm not using Interestingly, I can run the same CLI command twice, and the second time it will clean up the variables correctly. What gives? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This is due to Tailwind scanning for used CSS variables that match its theme tokens. So after changing to
Usually this doesn't happen because most of the time, the output CSS is git-ignored, and thus step 3 never happens. Thus, as a workaround, you should exclude
|
Beta Was this translation helpful? Give feedback.
This is due to Tailwind scanning for used CSS variables that match its theme tokens. So after changing to
text-4xl
:var(--text-5xl)
andvar(--text-5xl--line-height)
usage inoutput.css
. Save them for later.--text-5xl
and--text-5xl--line-height
.Usually this doesn't happen because most of the time, the output CSS is git-ignored, and thus step 3 never happens.
Thus, as a workaround, you should exclude
output.css
from being scanned by one of:/output.css
to your.gitignore
:@source not
to excludeoutput.css
from bei…