postcss-advanced-variables
postcss-advanced-variables copied to clipboard
Allow for CSS variables to be used with mixins
Fixes #78 . Allows for CSS variables to be set as the default value for a mixin or passed as a parameter.
Example:
@mixin set-color($color: var(--text-color)) {
color: $color;
}
h3 {
@include set-color;
}
h4 {
@include set-color(var(--my-color));
}
Before, that resulted in:
h3 {
color: va;
}
h4 {
color: va;
}
After, that results in:
h3 {
color: var(--text-color);
}
h4 {
color: var(--my-color);
}