Skip to content

v4: Prefixed theme values are not used to calculate pixel equivalents #1160

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
robisadev opened this issue Feb 2, 2025 · 1 comment · Fixed by #1166
Closed

v4: Prefixed theme values are not used to calculate pixel equivalents #1160

robisadev opened this issue Feb 2, 2025 · 1 comment · Fixed by #1166
Assignees
Labels
bug Something isn't working

Comments

@robisadev
Copy link

robisadev commented Feb 2, 2025

What version of VS Code are you using?

v1.96.4

What version of Tailwind CSS IntelliSense are you using?

v0.14.2

What version of Tailwind CSS are you using?

v4.0.3

What package manager are you using?

bun

What operating system are you using?

Windows

Tailwind config

@import 'tailwindcss' prefix(tw);

Describe your issue

When hovering over a prefixed tailwind 4 class the Tailwind Intellisense hint does not show the correct hint:

Image

If tailwind config does not use a prefix;

@import 'tailwindcss';

the Tailwind Intellisense hint works correctly:

Image

@thecrypticace thecrypticace self-assigned this Feb 2, 2025
@thecrypticace thecrypticace changed the title Tailwind 4 hints not fully working with prefixed classes v4: Prefixed theme values are not used to calculate pixel equivalents Feb 2, 2025
@thecrypticace thecrypticace added the bug Something isn't working label Feb 2, 2025
thecrypticace added a commit that referenced this issue Feb 5, 2025
Fixes #1160

We were passing the CSS variable straight through when resolving the
theme values but this isn't accurate when a prefix is used. The theme
variables *do not* have prefixes but the emitted CSS variables _do_.

We have to strip the prefix before doing the lookup.
@thecrypticace
Copy link
Contributor

This will be fixed in the next release of the extension 👍 (should be later today).

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