I tried to change the variable used in another variable from the mixin, but I couldn't change the variable value.
$color: white !default;
$var: "this #{$color} is a test" ;
@mixin test($value, $color) {
// here how to override the $color value
color: $value;
}
.a {
@include test($var, #ccc);
}
By default the $color
value is in white, and this $color
variable is used in another variable $var
.
When I pass the $var
inside a mixin to change its variable ($color
) value, it is not changed. Anyone please suggest the solution for this?
Expected Output:
.a {
color: "this #ccc is a test";
}
Thanks in advance.