Skip to content

consecutive dashes break autocomplete for functional utilities (v4) #1424

@ovsw

Description

@ovsw

What version of VS Code are you using?

v1.102.1

What version of Tailwind CSS IntelliSense are you using?

v0.14.25

What version of Tailwind CSS are you using?

v4.1.10

What package manager are you using?

pnpm

What operating system are you using?

verified on MacOS as well but currently on WSL2, running Ubuntu ( Wndows 11)

Tailwind CSS Stylesheet (v4)

@import "tailwindcss";

@theme {
  --tab--size-2: 2;
  --tab--size-4: 4;
  --tab--size-github: 8;
}
@utility tab-* {
  tab-size: --value(--tab--size- *);
}

VS Code settings

{
  "search.useIgnoreFiles": true,
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": "explicit",
    "source.fixAll.prettier": "explicit"
  },
  "editor.formatOnSave": true,
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    "typescript",
    "typescriptreact"
  ],
  "eslint.workingDirectories": [
    { "mode": "auto" }
  ],
  "eslint.useFlatConfig": true,
  "eslint.debug": true,
  "eslint.enable": true,
  "eslint.alwaysShowStatus": true,
  "typescript.preferences.includePackageJsonAutoImports": "on",
  "typescript.suggest.autoImports": true,
  "typescript.validate.enable": true,
  "typescript.reportStyleChecksAsWarnings": true,
  "tailwindCSS.experimental.configFile": "./packages/ui/src/styles/globals.css",
  "tailwindCSS.includeLanguages": {
    "typescript": "javascript",
    "typescriptreact": "javascript"
  },
  "tailwindCSS.classAttributes": ["class", "className", "ngClass"]
}

Reproduction URL

This issue is so straightforward that I didn't bother with a reproduction URL. Please let me know if this is needed.

Describe your issue
TW 4 variables containing 2 or more consecutive dashes -- (aside from the starting ones) break intellisense auto-complete for functional TW4 utilities using them.
This doesn't work (tab-2, tab-4, and tab-github don't appear as suggestions, but they do work as Tailwind classes):

@theme {
  --tab--size-2: 2;
  --tab--size-4: 4;
  --tab--size-github: 8;
}
@utility tab-* {
  tab-size: --value(--tab--size- *);
}

but if we remove the extra dashes, autocomplete starts working again:

@theme {
  --tab-size-2: 2;
  --tab-size-4: 4;
  --tab-size-github: 8;
}
@utility tab-* {
  tab-size: --value(--tab-size- *);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingupstream

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions