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
536 stars 62 forks source link

Negative variables are not compiled after update #122

Open sn3p opened 4 years ago

sn3p commented 4 years ago

Did something change regarding the compilation of negative variables?

In v0.14.0 this:

.foo {
  --width: 100px;
  with: -var(--width);
}

used to output:

.foo {
  with: -100px;
}

But after updating to v0.17.0 I get:

.foo {
  with: -var(--width);
}

I tried reproducing in the playground, but this still runs on v0.14.0.

MadLittleMods commented 4 years ago

Looking at the changelog, this probably broke in v0.15.0 where there were some changes around the regex and balanced matching.

Here is the relevant PR https://github.com/MadLittleMods/postcss-css-variables/pull/112

cc @Poetro