node-sass icon indicating copy to clipboard operation
node-sass copied to clipboard

Color keywords are replaced when prefixed with `--`

Open seamusleahy opened this issue 10 years ago • 2 comments

When a color keyword is prefixed with --, the value is replaced with the hex value. Other uses of the keyword are not replaces with the hex value.

Input: body{background: magenta; color: var(--magenta); border-color: var(--color-magenta);}

Output: body{background:magenta;color:var(--#ff00ff);border-color:var(--color-magenta)}

seamusleahy avatar Aug 24 '16 07:08 seamusleahy

Although the title may be different this is a dupe of #1624. You can track the issue/upstream issue there.

nschonni avatar Sep 01 '16 03:09 nschonni

This issue elaborates on the issue with colour names further: https://github.com/sass/sass/issues/2128#issuecomment-243897569

You should never use a colour name unquoted in Sass. However Sass 3.5 will have better support for custom properties (--red) http://blog.sass-lang.com/posts/809572-sass-35-release-candidate. This feature has not landed yet in node-sass.

xzyfer avatar Sep 01 '16 03:09 xzyfer