Reputation: 43
Is there a way to assign a value from a SASS function on a CSS variable?
I tried different things like:
--color: lighten(blue, 10%); // from a simple color
--color: lighten(var(--blue), 10%); // from another CSS variable
--color: lighten(#{$blue}, 10%); // from a SASS variable
--color: #{lighten(blue, 10%)}; // all function inside an interpolation
Nothing works.
Thanks.
Upvotes: 1
Views: 173
Reputation: 43
It works with:
--color: #{lighten(blue, 10%)};
or
--color: #{lighten($blue, 10%)};
Upvotes: 1