-
Notifications
You must be signed in to change notification settings - Fork 17
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
Custom properties (--*): CSS variables #4
Comments
Do you know if this worked on the 2019 version? also, purely out of curiosity, is there an advantage to using custom properties instead of sass properties? |
It worked perfectly well in VS 2019 (for years). Go to https://jsonformatter.org/scss-to-css and type: $var-name: green; See the result to the right. More good info here: Sass has advantages over css and that's the whole point using WebCompiler - right? |
I'll take a look to see if I can identify what changed during the upgrade, it makes it easier to track down the issue knowing if it worked in 2019. I was wondering about the mixing of variable types, the custom properties with the sass variables; I haven't used custom properties and was just wondering if I was missing something with them. |
It looks like this was caused by a change to node-sass sass/node-sass#2627 Can you try the following and let me know if it works? $var-name: green; |
Pingo that was it! So instead of using (which worked in Web Compiler 2019): I now have to use (in Web Compiler 2022): Well, it's obvious I suck at keeping current with Sass. Thanks a Million! |
I hate when they move the cheese! // I'm not gonna lie, I haven't been keeping current with it either, I should go peruse the documentation to see what I'm missing out on |
Installed product versions
Description
Compilation fails when a custom CSS properties uses a variable.
Steps to recreate
Current behavior
The "variable name" rather than the "value" gets compiled into the CSS file.
Expected behavior
The CSS should display:
.my-class {
--mdc-theme-primary: #4caf50;
}
But instead displays:
.my-class {
--mdc-theme-primary: $medium-green;
}
The text was updated successfully, but these errors were encountered: