Skip to content

- works as a custom variant, but -- doesn't #18863

@benface

Description

@benface

What version of Tailwind CSS are you using?

v4.1.12

What build tool (or framework if it abstracts the build tool) are you using?

Tailwind Play, Vite, etc.

What version of Node.js are you using?

v24

What browser are you using?

Firefox, Safari, Chrome

What operating system are you using?

macOS

Reproduction URL

https://play.tailwindcss.com/dYzm7i79CK

Describe your issue

Like the title says. Interestingly, IntelliSense seems to say that the following CSS will be generated:

.--\:bg-amber-500 {
  @layer x-unimportant {
    background-color: var(--color-amber-500) /* oklch(76.9% 0.188 70.08) */;
  }
}

However, it's not.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions