style-merge
style-merge copied to clipboard
Incorrectly parsing calc(expr) functions
We seem to be incorrectly parsing calc(expr)
functions.
Input CSS:
body {
width: calc(100% - 32px);
height: calc(100% - 64px);
}
Output CSS:
body {
width: calc(100% = 32px);
height: calc(100% = 64px);
}
Short-term Workaround:
Escaping the operator seems to fix the issue: width: calc(100% \- 32px)
Digging through the code, this is caused by the ExCSS Stylesheet parser
. We are using a very old version of this, where this issue was probably occurring: https://github.com/TylerBrinks/ExCSS/issues/74. This seems to have been fixed in newer versions.