MadLittleMods / postcss-css-variables

PostCSS plugin to transform CSS Custom Properties(CSS variables) syntax into a static representation
https://madlittlemods.github.io/postcss-css-variables/playground/
Other
542 stars 61 forks source link

Parenthesis problem #114

Open Mangatt opened 4 years ago

Mangatt commented 4 years ago

When using rgba fallbacks for CSS variables, output is wrong:

:root{
    --color: rgba(0,0,0,0.5);
}
p{
    color: var(--color, rgba(0,0,0,0.5));
}

is transformed into (notice two parentheses on the right):

p{
    color: rgba(0,0,0,0.5));
}

Any way around that?

MadLittleMods commented 4 years ago

Hey @Mangatt, I am guessing https://github.com/MadLittleMods/postcss-css-variables/pull/112 will probably solve your problem. Stay tuned there for progress