postcss / postcss-custom-properties

Use Custom Properties in CSS
https://postcss.github.io/postcss-custom-properties
MIT License
596 stars 77 forks source link

Fix multiple var on a single property #210

Closed ryuran closed 4 years ago

ryuran commented 4 years ago
:root {
    --color-h: 0;
    --color-s: 100%;
    --color-l: 50%;
    --color-hsl: hsl(var(--color-h), var(--color-s), var(--color-l));
}

.test--color_w_vars {
    color: var(--color-hsl);
}

Should be resolved as

.test--color_w_vars {
    color: hsl(0, 100%, 50%);
}