Closed mbaumbach closed 2 years ago
And just to confirm, the pulled in postcss-custom-properties
dependency is v12.0.0.
This appears to be fixed in the latest commits, perhaps with the change to the new parser. I created a sample test in basic.css
:
.test--calc-no-spaces {
transform: translateX(calc(-50% + var(--xxx, 1)*var(--yyy, 10px)));
}
That resulted in:
.test--calc-no-spaces {
transform: translateX(calc(-50% + 1*10px));
transform: translateX(calc(-50% + var(--xxx, 1)*var(--yyy, 10px)));
}
Is there any way to get a new release out to NPM with the new parser in place or is there more work to do there?
Confirmed this is fixed in 12.0.1.
This was found and detailed in another project, but I suspect this is a bug with this project (or perhaps one of its dependencies). The following line:
Throws the following error:
When I manually modify the CSS to include a space around the asterisk between the two custom properties, everything compiles correctly. This code looks like valid CSS to me though, so I think this is a bug in the parser. This code does correctly parse:
The link above provides steps to reproduce the error. This is part of a create-react-app 5.0.0 project using the Shopify Polaris 7.5.0 framework.