Open onvlt opened 1 year ago
Hello onvlt 👋 I notice that this repo has not had any new commits for the past year, and version 2.6.0, submitted last year, has not been released. Therefore, I forked the repo and developed a new extension based on version 2.6.0, named Color Highlight - Hue Show Better Version.
The extension Color Highlight - Hue Show Better Version can solve your issue. Feel free to try it out : ) https://marketplace.visualstudio.com/items?itemName=Yunduo.color-highlight-css-color-4
@wangyunduo cool! thanks for this improvement
CSS Color Module Level 4 specifies new syntax for colors funcions like
rgb
,hsl
etc. which allows omitting commas and specifying alpha component by appending/ <alpha>
value. So legacy color function likergba(0, 0, 0, 0.5)
could be rewritten likergb(0 0 0 / 50%)
This extension already supports higlighting comma-less color functions, but it doesn't work for functions with slash-separated alpha values.
Examples
Works:
Doesn't work: