What version of VS Code are you using?
v1.113.0
What version of Tailwind CSS IntelliSense are you using?
v0.14.29
What version of Tailwind CSS are you using?
v4.2.1
What package manager are you using?
npm
What operating system are you using?
macOS
Tailwind CSS Stylesheet (v4) or config file (v3)
@import "tailwindcss";
@reference "#theme.css";
.example {
color: var(--color-brand);
}
package.json:
{
"imports": {
"#theme.css": "./src/theme.css"
}
}
VS Code settings
{
"files.associations": {
"*.css": "tailwindcss",
"*.scss": "tailwindcss"
},
"tailwindCSS.lint.cssConflict": "ignore"
}
There are no workspace-specific VS Code settings in the reproduction repo.
Reproduction URL
https://github.com/DaniGuardiola/tailwind-vscode-reference-imports-repro
Describe your issue
In a Tailwind CSS v4 stylesheet, @reference "#theme.css"; is shown as a clickable link in VS Code.
However, when I Cmd+Click it, VS Code tries to open a literal file named #theme.css and shows an error that the file could not be found, instead of resolving the alias through package.json#imports.
The reproduction repo defines:
{
"imports": {
"#theme.css": "./src/theme.css"
}
}
and the referenced file exists at src/theme.css.
Steps to reproduce:
- Open the reproduction repo in VS Code.
- Open
src/app.css.
- Cmd+Click
#theme.css in @reference "#theme.css";.
Expected behavior:
- The alias resolves through
package.json#imports.
- VS Code opens
src/theme.css.
Actual behavior:
- The reference appears clickable.
- Cmd+Click fails because VS Code appears to treat
#theme.css as a literal file path instead of a package import alias.

What version of VS Code are you using?
v1.113.0
What version of Tailwind CSS IntelliSense are you using?
v0.14.29
What version of Tailwind CSS are you using?
v4.2.1
What package manager are you using?
npm
What operating system are you using?
macOS
Tailwind CSS Stylesheet (v4) or config file (v3)
package.json:{ "imports": { "#theme.css": "./src/theme.css" } }VS Code settings
{ "files.associations": { "*.css": "tailwindcss", "*.scss": "tailwindcss" }, "tailwindCSS.lint.cssConflict": "ignore" }There are no workspace-specific VS Code settings in the reproduction repo.
Reproduction URL
https://github.com/DaniGuardiola/tailwind-vscode-reference-imports-repro
Describe your issue
In a Tailwind CSS v4 stylesheet,
@reference "#theme.css";is shown as a clickable link in VS Code.However, when I Cmd+Click it, VS Code tries to open a literal file named
#theme.cssand shows an error that the file could not be found, instead of resolving the alias throughpackage.json#imports.The reproduction repo defines:
{ "imports": { "#theme.css": "./src/theme.css" } }and the referenced file exists at
src/theme.css.Steps to reproduce:
src/app.css.#theme.cssin@reference "#theme.css";.Expected behavior:
package.json#imports.src/theme.css.Actual behavior:
#theme.cssas a literal file path instead of a package import alias.