sass / dart-sass

The reference implementation of Sass, written in Dart.
https://sass-lang.com/dart-sass
MIT License
3.9k stars 352 forks source link

SCSS silently fails to compile lines beginning with `--` #2195

Closed chrisdeeming closed 6 months ago

chrisdeeming commented 6 months ago

Please see: https://sass-lang.com/playground/#eJwzNHQoLU5VUCpOLC62Ss7PyS9SsubisirKzy/hquZSUNDVLUssslIAy+gl5hRkJGpkFOdoGOgoGBoYqOoomBqoampagxQSpa4WAEBwHx8=

This may be as designed but it felt unexpected to me.

When setting CSS variables, if the variable name starts with --, the rest of the line silently skips compilation.

Is this an intentional feature/escape sequence to instruct the compiler to skip the line? I couldn't find it stated anywhere as being intentional.

chrisdeeming commented 6 months ago

Found the documentation now: https://sass-lang.com/documentation/style-rules/declarations/#custom-properties

Interpolation is the solution!