ritwickdey / vscode-live-sass-compiler

Compile Sass or Scss file to CSS at realtime with live browser reload feature.
https://ritwickdey.github.io/vscode-live-sass-compiler/
MIT License
660 stars 168 forks source link

Compilation Error - Can't use variable inside hsl #555

Open ItsMeStompy opened 2 years ago

ItsMeStompy commented 2 years ago

I have set a variable called --color-pale to "225, 100%, 94%" so that when I put it inside a hsl tag, i can change the opacity of the color with the variable inside the hsl tag eg. background-color: hsl(var(--color-pale), .5) but when it compiles, it comes up with the error below. The css used is the second screenshot. It could just be me being an idiot but any help would be apreciated, thanks.

Error SCSS

paulfm commented 2 years ago

I am having the same problem. variables are able to hold complete color information like --variable-name: rgb(128 128 128) so that color: var(--variable-name) works but if the variable is set to --variable-2: 128 128 128; you cannot use color: rgb(var(--variable-2)); without getting a compile error about $green not being defined.

I really wish this would work to allow me to use rgba and simply pick the opacity in the code.