mattbasta / crass

A CSS minifier and utility library for JavaScript
http://mattbasta.com/crass
MIT License
102 stars 6 forks source link

Removal of Parentheses in calc Results in Sign Change #65

Closed IndieSW closed 6 years ago

IndieSW commented 6 years ago

Something like: calc(( 1px + 2px ) + (( 100% - ( 3px + 4px ) - 5px ) / 2 ))

becomes: calc( 1px + 2px + ( 100% - 3px + 4px - 5px ) / 2 )

Notice that '+ 4px' should be '- 4px'.

Thanks for the great work!

mattbasta commented 6 years ago

Should be fixed in 0.12.0, along with some fresh optimizations for calc()