Description
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.