Skip to content

Syntax highlighting for Tailwind CSS v4 directives (@utility, @custom-variant, @variant) #1250

Open
@devenini

Description

@devenini

What version of VS Code are you using?

v1.98.0

What version of Tailwind CSS IntelliSense are you using?

v0.14.8

What version of Tailwind CSS are you using?

v4.0.9

What package manager are you using?

npm

What operating system are you using?

macOS

VS Code settings

{
    "tailwindCSS.experimental.configFile": "./src/styles/main.css",
    "files.associations": {
        "*.css": "tailwindcss"
    }
}

Describe your issue

Currently, when using Tailwind CSS v4 directives such as @utility, @custom-variant, or @variant, syntax highlighting is lost, and everything appears as plain white text. This makes it difficult to differentiate styles and maintain readability.

Image

Features like suggestions and hover work correctly.

Steps to reproduce:

  • Use any of the Tailwind CSS v4 directives in an editor with syntax highlighting.
  • Observe that the syntax coloring disappears.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions