Skip to content
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

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

Open
onvlt opened this issue Dec 28, 2022 · 2 comments
Open

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

onvlt opened this issue Dec 28, 2022 · 2 comments

Comments

@onvlt
Copy link

onvlt commented Dec 28, 2022

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

@onvlt onvlt changed the title Support CSS Color Module 4 / opacity notation Support CSS color function / opacity notation from CSS Color Module 4 Dec 28, 2022
@onvlt onvlt changed the title Support CSS color function / opacity notation from CSS Color Module 4 Support new CSS color syntax with alpha component after / Dec 28, 2022
@wangyunduo
Copy link

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
Copy link
Author

onvlt commented Aug 25, 2023

@wangyunduo cool! thanks for this improvement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants