Using CSS Variables as Sass function arguments
问题 Is there a way to use CSS variables with Sass functions e.g. lighten? Something like this: :root { --color: #ff00ff; } .div { background-color: lighten(var(--color), 32%); } I'm getting an error message that "Argument $color of lighten($color, $amount) must be a color". I'm using CSS (not Sass) variables, because I need to use them in js. 回答1: UPDATE: I just read that Sass 3.5.0 now should support CSS Custom Properties with native CSS functions. I tried this with node-sass but as yet libsass