tailwindlabs / tailwindcss-intellisense

Intelligent Tailwind CSS tooling for Visual Studio Code
2.74k stars 182 forks source link

Show color decorators when utility has an opacity modifier in v4 #969

Closed thecrypticace closed 1 month ago

thecrypticace commented 1 month ago

We use color-mix to apply alpha values to colors — because of this we don't show color decorators for any utility with an opacity modifier in a v4 project.

We remove the wrapping color-mix and apply the alpha value to the color so we end up parsing a valid color string into their separate r, g, b, and a channels.

Also made sure that gradient utilities show their color swatches — they were being excluded because we were looking at declarations inside @property and then throwing stuff out.