Skip to content

Tailwind syntax not recognised by IDE. Shows problem when used in CSS file. #20480

Description

@Daverine

**What version of Tailwind CSS are you using?**v4

For example: v4.0.6

**What build tool (or framework if it abstracts the build tool) are you using?**Nuxt js 4.6, vite 8

For example: postcss-cli 11.0.0, Next.js 15.1.7, Vite 6.1.0

**What version of Node.js are you using?**v24

For example: v20.0.0

**What browser are you using?**Firefox

For example: Chrome, Safari, or N/A

**What operating system are you using?**Windows

For example: macOS, Windows

Reproduction URL

A Tailwind Play link or public GitHub repo that includes a minimal reproduction of the bug. Please do not link to your actual project, what we need instead is a minimal reproduction in a fresh project without any unnecessary code. This means it doesn't matter if your real project is private/confidential, since we want a link to a separate, isolated reproduction anyways.

A reproduction is required when filing an issue — any issue opened without a reproduction will be closed and you'll be asked to create a new issue that includes a reproduction. We're a small team and we can't keep up with the volume of issues we receive if we need to reproduce each issue from scratch ourselves.

Describe your issue
VS Code see tailwind CSS file as just a CSS file and that shows problem when tailwind specific syntax is used. I have to manually change the language to tailwind every time to fix the issue. I want to suggest that a suffix should be adopted for tailwind CSS files to help IDEs differentiate a tailwind CSS file from a regular CSS file.
Something like main.tw.css that maybe compile to main.css

Describe the problem you're seeing, any important steps to reproduce and what behavior you expect instead.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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