Open alexhaines123 opened 5 years ago
For reference, the following example works as expected. I would expect that https://github.com/MadLittleMods/postcss-css-variables/issues/37 fixed the problem which was released in v0.7.0
. Which version are you using?
Input:
:root {
--color-form-selected: red;
--color-positive-green: green;
}
.a-checkbox__input:checked ~ .a-checkbox__label {
background-color: var(--color-form-selected);
border-color: var(--color-positive-green, var(--color-form-selected));
}
Output:
.a-checkbox__input:checked ~ .a-checkbox__label {
background-color: red;
border-color: green;
}
I'm using postcss-css-variables with a JSON file with this data:
On this css which uses variable fallbacks but oddly it chooses the last variable provided instead of the first.
But it outputs
Expected