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

Color squares when using CSS and SCSS variables #166195

Closed
allan2 opened this issue Nov 12, 2022 · 4 comments
Closed

Color squares when using CSS and SCSS variables #166195

allan2 opened this issue Nov 12, 2022 · 4 comments
Assignees
Labels
*out-of-scope Posted issue is not in scope of VS Code

Comments

@allan2
Copy link

allan2 commented Nov 12, 2022

Color squares appear when defining CSS or SCSS variables, but not when using them.

It would be really useful is the squares showed up when using variables from other files.

variable-color-square

@GauravB159
Copy link
Contributor

I don't think it'll be easy to get variable colors to display from other files, at least not in a way I can think of. Maybe from the same file, it would be possible. Possibly from currently open files.

@allan2
Copy link
Author

allan2 commented Nov 13, 2022

@GauravB159 the color completion already scopes from open files, although the behvaviour is not consistent (#166203).

@GauravB159
Copy link
Contributor

@allan2 Hmm, I'll look into it then, maybe I'll find something

@aeschli
Copy link
Contributor

aeschli commented Nov 14, 2022

The color decorator might not be correct. Only at runtime, the browser will know the actual value of a variable. There can be multiple declaration of the same variable, under different scopes, or the variable can be set programmatically.

So I'f prefer to leave things as they are.

@aeschli aeschli closed this as completed Nov 14, 2022
@aeschli aeschli added the *out-of-scope Posted issue is not in scope of VS Code label Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
*out-of-scope Posted issue is not in scope of VS Code
Projects
None yet
Development

No branches or pull requests

3 participants