enyancc / vscode-ext-color-highlight

Extension adds colored border around css/web colors in the editor
GNU General Public License v3.0
263 stars 85 forks source link

Support new CSS color syntax with alpha component after `/` #176

Open onvlt opened 1 year ago

onvlt commented 1 year ago

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 like rgba(0, 0, 0, 0.5) could be rewritten like rgb(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: Works

Doesn't work: Doesn't work

wangyunduo commented 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

image
onvlt commented 1 year ago

@wangyunduo cool! thanks for this improvement