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
Show color of Sass variables? #29
Comments
|
👍 +1 |
|
I see in |
|
@Jordan4jc No example found though, so I tried various values, both relative and absolute, with front- or backslash, even rebooted VSCode, but no success. It only seems to work when the definition is in the same scss-file, it can't find the definition outside the current file. |
|
I'm looking through the code for help understanding what |
|
The I was able to get it working with external variables by - @import 'vars.color';
+ @import '_vars.color.scss';Not ideal, and in my case, flags linter errors. I tried looking into a fix but I'm not sure how this project is even set up — I have version 2.3.0 installed apparently, but GitHub only shows version 2.2.0... 🤔 |
|
Why does this require configuring include paths anyway? The Atom equivalent of this plugin just seems to grab variables from any SCSS file in your project. |
|
Agree with @mattaningram. I am trying to migrate to vscode from Atom. This is a feature I really liked in Atom. I have not been able to get it to work. I would like some documentation on color-highlight.sass.includePaths. |
|
Color Highlight - https://marketplace.visualstudio.com/items?itemName=naumovs.color-highlight --- it helps me do that. |
|
Color highlight, does that function, but in my case in each file I have to refer to the file where the color variables are with a comment because if not the sinter linter gives me an error, Color highlight hace esa función, pero en mi caso en cada archivo tengo que hacer referencia al archivo donde se encuentran las variables de color con un comentario porque sino el linter de sass me da error, |
|
Is there any documentation for includePaths yet, as this still does not work. |
|
Why don't you guys try Colorize? |
I would need something more subtle than colorize (or I can't see the setting to make it more subtle). I can't remember if what I have is vanilla VS Code, but this small square preceding HEX color is perfect. It would be nice to have the same with Sass variables. |
|
@qbconcept KamiKillertO/vscode-colorize#274 |
|
I agree this feature would be very helpful to use without the need to explicitly import the variable file |
Because it doesn't support colorizing the sass variables? |
|
Thank you so much @albertochigua |
|
@albertochigua This sadly only works for directly assigned variables. As soon as a variable gets assigned to another one (or if you try to mix colors or similar) it doesn't work and is therefore useless to me. In Atom (with the "pigments" package) I can do this: » But the Atom Project was discontinued in dec 2022 so I'm looking forward to use VSC. I'm desperately searching for an extension which is able to follow color functions and stuff.. Is there anything comparable? |
|
Any updates on this? I am desperately searching, got so far that I stumbled across my own comment here.. So my VS Code just looks like this when using Colorize and the suggested settings: I also tried Color Highlight and many others, tinkered with the settings, asked questions on stackoverflow and so on, but no success. |
Hi @Azragh , while I don't fully understand what you exactly mean by the above statement... I have been using |








Would it be possible to show the color of a Sass variable?
For example, if I have a variable declared like this in my Sass setup:
$primaryColor: #77baa8;which is then used like this:
&.div { background-color: $primaryColor; }It would be very handy if
$primaryColorin the latter example got color highlighted with #77baa8The text was updated successfully, but these errors were encountered: