Description
What version of Tailwind CSS are you using?
tailwindcss
: v4.0.1
@tailwindcss/vite
: 0.0.0-insiders.7f1d097
The insiders version is the latest as of this issue's publication, needed because #16052 hasn't been released stable yet. However, as mentioned below, the issue also happens with a PostCSS setup, so it doesn't seem tied to vite.
What build tool (or framework if it abstracts the build tool) are you using?
For example: Solid Start (repo version directly)
What version of Node.js are you using?
For example: v23.6.1
What browser are you using?
N/A
What operating system are you using?
N/A
Reproduction URL
Describe your issue
Related Solid Start issue: solidjs/solid-start#1749
Tailwind CSS v4 (recently fixed to work with Solid Start) outputs &
as &
which breaks the styles.
For example, a class using a "dark theme" variant like this:
.dark\:bg-red-500 {
&:where(.dark, .dark *) {
background-color: var(--color-red-500);
}
}
This is actually outputted like this:
.dark\:bg-red-500 {
&:where(.dark, .dark *) {
background-color: var(--color-red-500);
}
}
It doesn't depend on the vite setup because it also happened with the alternative PostCSS-based setup. Unsure if the issue is on Solid Start's side or Tailwind CSS's side.