I am using gulp-sass and I'm getting the following error:
Error: argument `$color` of `rgba($color, $alpha)` must be a color
When I am trying to compile the following code:
color: rgba(var(--color), 1)
What is the problem?
I am using gulp-sass and I'm getting the following error:
Error: argument `$color` of `rgba($color, $alpha)` must be a color
When I am trying to compile the following code:
color: rgba(var(--color), 1)
What is the problem?
Try this SASS:
$r: 255
$g: 0
$b: 0
$a: 1
color: rgba($r,$g,$b,$a)
Compiles to this CSS:
color: red;
If you'd like to stick to CSS4 variables, you can find out more about handling this issue here.
Alternatively, see the answer on this related SO question.