Skip to content

Negative impact of including static declarations in custom variants #1347

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 8, 2025 · 3 comments · Fixed by #1356
Closed

Negative impact of including static declarations in custom variants #1347

functasti opened this issue May 8, 2025 · 3 comments · Fixed by #1356
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

Describe your issue

  1. Including static declarations in custom variants disrupts the VS Code intellisense suggestions, pushing utility information out of view.

Example:

@custom-variant range-thumb {
  &::-webkit-slider-thumb {
    appearance: none;
    cursor: grab; 
    @slot;
  }
  &::-moz-range-thumb {
    @slot;
  }
}

When using utilities like range-thumb:w-* or range-thumb:h-*, instead of displaying px or rem values for each step, the suggestions will prioritize the static declarations appearance: none; cursor: grab;. This obscures the actual utility values.

  1. VS Code inline color preview functionality stops working for color related utility classes.

Example:

range-thumb:bg-blue-600

Instead of displaying the usual color preview (a blue square), the preview does not render at all.

@thecrypticace thecrypticace self-assigned this May 8, 2025
@thecrypticace
Copy link
Contributor

oooh… makes sense why we display it this way but definitely feels unexpected from a user standpoint. Lemme think through this one some

@thecrypticace thecrypticace added the bug Something isn't working label May 8, 2025
@functasti
Copy link
Author

Thanks for the quick fix!

@thecrypticace
Copy link
Contributor

I'm aiming to get a release out this week with this fix.

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