microsoft / vscode-css-languageservice

CSS, LESS & SCSS language service extracted from VSCode to be reused, e.g in the Monaco editor.
MIT License
318 stars 177 forks source link

Color completion only displays color squares for hex variables #314

Open GauravB159 opened 1 year ago

GauravB159 commented 1 year ago

Based on issue microsoft/vscode#166197

image

File: cssCompletion.ts

This function only tests for built-in colors and hex values. Adding another part to it that checks for color functions fixes the two color functions.

Making this change fixes $rgb and $rgba.

allan2 commented 1 year ago

@GauravB159 do you know if your PR also helps with vscode #166201?

GauravB159 commented 1 year ago

@allan2 That's actually a separate issue. I've looked into that as well, and I'm mostly done with it. But there are a few tests failing. I might push a draft PR in a bit anyways because I'm not sure if those tests are based on correct behavior or not.