Skip to content

Opacity variables are supported but not suggested #1541

@Elarcis

Description

@Elarcis

What version of VS Code are you using?

1.108.1 (user setup)

What version of Tailwind CSS IntelliSense are you using?

0.14.29

What version of Tailwind CSS are you using?

4.1.18

What package manager are you using?

npm

What operating system are you using?

Windows 11

Tailwind CSS Stylesheet (v4) or config file (v3)

@import "tailwindcss";

@theme {
  --opacity-half: 50.1%;
}

VS Code settings

Reproduction URL

https://github.com/Elarcis/TailwindCSS-Intellisense-Opacity-Bug

Describe your issue

When using the undocumented --opacity-* namespace, TailwindCSS generates proper CSS classes based on the detected variables and TailwindCSS Intellisense properly assesses what the generated CSS will look like (I used an arbitrarily precise value to avoid any ambiguity).

Image

However, it does not suggest these variables when using the / syntax, e.g. bg-teal-500/half.

Image

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