Skip to content

v4 intellisense suggests dot instead of underscore in color names #1184

New issue

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

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

Already on GitHub? # to your account

Closed
marce1l opened this issue Feb 9, 2025 · 2 comments · Fixed by tailwindlabs/tailwindcss#16433
Closed

Comments

@marce1l
Copy link

marce1l commented Feb 9, 2025

What version of VS Code are you using?

v1.96.2

What version of Tailwind CSS IntelliSense are you using?

v0.14.3

What version of Tailwind CSS are you using?

v4.0.5

What package manager are you using?

npm

What operating system are you using?

Nixos 25.05

Reproduction URL

Paste the follwing code to the css tab at https://play.tailwindcss.com/

@theme {
  --color-text_color: rgba(var(12, 14, 28));
}

Try typing text-text

Image

Describe your issue

When typing text-text the autocompletion suggest text-text.color even though the correct style name is text-text_color. This issue also occurs if the theme color is defined and imported from a tailwind.config.js

For example

export default {
  theme: {
      extend: {
        colors: {
          text_color: "rgba(12, 14, 28)",
        },
      },
    },
};
@thecrypticace
Copy link
Contributor

Play reproduction: https://play.tailwindcss.com/8EwF7nINZ0

cc @philipp-spiess we should fix this in Tailwind CSS itself. Also discovered that right now with the given theme text-text_color and text-text.color both work as utilities which is a bit surprising but also makes sense b/c of how we handle dots in themes. Maybe we should fix that?

@thecrypticace
Copy link
Contributor

This'll be fixed in the next patch release of Tailwind CSS 👍

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants