In version 2.11.0, complex calc functions would not be simplified, so they would remain as is when compiled. However, I upgraded postcss-cssnext and in version 3.1.0, postcss-cssnext tries to simplify the calc function, but does so incorrectly. Maybe I'm doing something wrong on my end, but upgrading from 2.11.0 to 3.1.0 seems to mess up the result. For example:
In version 2.11.0, complex calc functions would not be simplified, so they would remain as is when compiled. However, I upgraded postcss-cssnext and in version 3.1.0, postcss-cssnext tries to simplify the calc function, but does so incorrectly. Maybe I'm doing something wrong on my end, but upgrading from 2.11.0 to 3.1.0 seems to mess up the result. For example:
calc(100% + (2 * 100px) - ((75.37% - 63.5px) - 900px));
incorrectly simplifies and compiles to:
calc(100% + 200px - 75.37% - 963.5px));
The double negative here is not handled properly.
Also, the following:
calc(((((100% + (2 * 30px) + 63.5px) / 0.7537) - (100vw - 60px)) / 2) + 30px);
incorrectly simplifies and compiles to:
calc((176.0366% + 217.4052px - 100vw - 60px) / 2 + 30px);
I have no idea what is happening here, but it's completely wrong.
I know I could simplify my calcs, but there are some semantics behind organizing it this way in my code.
In version 2.11.0, when the compiled calcs were sent to the browser without being simplified, they worked as expected.