Flex property with complex calc operation results in invalid CSS
Just noticed this, I feel like this is a regression but I'll try bisect where this happened.
Given the following CSS:
.a {
flex: calc((100% - 1.8em) / 2) 0 0;
}
The expected CSS would be something like this:
.a {
-webkit-flex: calc((100% - 1.8em) / 2) 0 0;
-ms-flex: calc((100% - 1.8em) / 2) 0 0;
flex: calc((100% - 1.8em) / 2) 0 0;
}
However the resulting CSS is:
.a {
-webkit-box-flex: calc((100%;
-webkit-flex: calc((100% - 1.8em) / 2) 0 0;
-ms-flex: calc((100% - 1.8em) / 2) 0 0;
flex: calc((100% - 1.8em) / 2) 0 0;
}
Which causes the browsers parser to try and rescue what it can.
A work around is to override Autoprefixer like so:
.a {
flex: calc((100% - 1.8em) / 2) 0 0;
-webkit-box-flex: calc((100% - 1.8em) / 2) 0 0;
}
You can test this with the interactive demo here: http://simevidas.jsbin.com/gufoko/quiet
Thanks,
Try to fix tomorrow. PostCSS has special module for correct parse of space delimited list.
Thanks for the speedy response, certainly no rush from my point of view considering the work around is relatively simple.
Fixed 5cc7f3bbd0214f3c7e4da34d546b3d383867cf1b
Released in 5.1.1 version.