CSS - variable for Sass colors
I'm trying to use CSS Variables - variables with some Sass function like rgba or color set, but I keep getting the error:
"Error: $ color:" var (- color) "is not a color for` rgba '"
This is my code:
--color: #{rgb(132, 200, 3)};
--rgba: #{rgba(var(--color), 0.5)};
.color {
color: mix($white, var(--rgba), 50%);
}
Any advice on what I am doing wrong?
+3
source to share