-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
[v4.0.9] Variables are ignored when referenced within CSS Modules #16904
Comments
Hey! Thanks for the bug report. The issue is that right now we do not scan |
We have the same issue, all CSS variables which are not referenced inside e.g. On top of that, we have e.g. References like
|
What version of Tailwind CSS are you using?
For example: v4.0.9
What build tool (or framework if it abstracts the build tool) are you using?
Vite 6.2.0
What version of Node.js are you using?
22.0.0
What browser are you using?
Chrome, Safari and Firefox
What operating system are you using?
macOS and Windows
Reproduction URL
https://github.com/boylett/tailwind-4-0-9-cssmodule-var-bug
Describe your issue
When referencing the main theme file within CSS Modules, variables are no longer recognised and exported in the main CSS.
This works fine in 4.0.8 (see 'working' branch) so am inclined to believe it has something to do with the new
@reference
keyword.Within reproduction, the background colour of the main "Welcome" component wrapper should be
--color-hot-pink
rather than transparent.On the 'main' branch, tw 4.0.9, the variable is simply ignored and not included in the final CSS.
The text was updated successfully, but these errors were encountered: