Skip to content

VS Code inline color preview not displayed for custom colors in specified function context #1359

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
functasti opened this issue May 12, 2025 · 3 comments · Fixed by #1360
Closed
Assignees
Labels
bug Something isn't working

Comments

@functasti
Copy link

What version of VS Code are you using?

v1.99.3

What version of Tailwind CSS IntelliSense are you using?

v0.14.16

What version of Tailwind CSS are you using?

4.1.3

What package manager are you using?

npm

What operating system are you using?

Ubuntu Linux

Tailwind config

Default

VS Code settings

{
  "files.associations": {
    "*.css": "tailwindcss"
  },

  "tailwindCSS.classFunctions": ["clsx"]
}

Reproduction:

@theme {
  --color-test-intellisense: hsl(240deg 100% 50%);
}

Code:

  const COLORS_BY_STATUS = {
    success: clsx("bg-test-intellisense"),
    error: "",
  };

Image

Image

@thecrypticace
Copy link
Contributor

This looks like we're not parsing the hsl value for color swatches on utilities:

Image

Even simple things like completions and @apply don't show the swatch for the hsl color. This is probably a regex problem or something.

(the color swatch next to hsl(…) itself is provided by the CSS language server so is unrelated)

@functasti
Copy link
Author

Thanks for the quick fix!

@thecrypticace
Copy link
Contributor

Gonna try to get a release out this week 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants