microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.36k stars 28.92k forks source link

[css] Lab colors and other CSS Color Module Level 4 features #43111

Open thorn0 opened 6 years ago

thorn0 commented 6 years ago

See the CSS Color Module Level 4 specification.

While the specification is still a draft and browsers don't support these features yet, there already exists a PostCSS plugin that (partially) implements them, so it's actually already possible to use at least a part of them.

.example {
    background-color: lab(33 43 -47);
    box-shadow: 0 0 20px lch(54 107 41 / 10%);
}

Would be nice to get previews for those colors in VS Code like it's shown for rgb/rgba/hsl colors.

aeschli commented 6 years ago

In general, we wait until a spec is adopted by most browsers. Following a spec in progress is very time consuming and can lead to user confusion as well.

aeschli commented 4 years ago

If anyone is interested in adding support for more color notations, the code is in https://github.com/microsoft/vscode-css-languageservice/blob/master/src/languageFacts/colors.ts

mathiasbynens commented 3 years ago

Since the color pickers in Chrome DevTools, Edge DevTools, and Safari DevTools all produce the comma-free syntax nowadays, it seems extra important for VS Code to support it. Does this affect prioritization for this request at all?

glen-84 commented 3 years ago

Related: #111337.