Skip to content

Autocomplete doesn't activate properly when another stylesheet in project has directives/functions without also importing tailwindcss. #1137

@iamstevemckinney

Description

@iamstevemckinney

What version of VS Code are you using?

1.96.4

What version of Tailwind CSS IntelliSense are you using?

v0.14.1

What version of Tailwind CSS are you using?

v4.0.0

What package manager are you using?

npm

What operating system are you using?

macOS 15.1.1

VS Code settings

{
    "explorer.confirmDelete": false
}

Reproduction URL

public GitHub repo

Describe your issue
If @import 'tailwindcss' is not in every css file in the project, but tailwind directives are used, autocompletions don't work correctly. This affects real world use cases of using @import to separate custom css in a larger project.

If there is 1 file with @import 'tailwindcss' autocomplete works perfect in index.html. If I add another css file to the project and include an @apply directive in it, then upon re-opening the project in vscode autocomplete will not activate in index.html (but will in style.css).

If there is @Utility in another css file, then upon re-opening the project in vscode, autocomplete will work in index.html, but not show any completions that have colors (e.g. bg-amber-500)

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