Skip to content

[Bug?]: Tailwind CSS v4 outputs & as & which breaks the styles #1749

@DaniGuardiola

Description

@DaniGuardiola

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

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);
  }
}

Expected behavior 🤔

Outputs & directly.

Steps to reproduce 🕹

See repro: #1748

Context 🔦

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.

Related Tailwind CSS issue: tailwindlabs/tailwindcss#16133

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions