armin-pfaeffle / atom-minify

Minifies JS and CSS files, optionally on save ‒ package for atom.io
https://atom.io/packages/atom-minify
MIT License
24 stars 7 forks source link

Removes necessary spaces in calc function #46

Closed gabeseltzer closed 7 years ago

gabeseltzer commented 7 years ago

I'm writing a website, and I have the following lines of css:

.teams-and-prizes>div>div>.prize {
    width: calc(100% + 40px);
    border-bottom: 1px solid #e2e2e2;
}

When I minify my css (on a PC) the space gets removed from either side of the + sign:

.teams-and-prizes>div>div>p{width:calc(100%+40px); (and so on...)

This causes the expression to break. My friend tried minifying it on his mac, and it works fine. We both have the same version of the package.

armin-pfaeffle commented 7 years ago

Which minifier do you use? YUI Compressor, clean-css, CSSO or Sqwish? Can you compare this to your friend?

gabeseltzer commented 7 years ago

Thanks for checking in. I'm using the default YUI Compressor, my friend is using CSSO. He just tried switching to YUI had the same issue as me. Guess we found the problem!

armin-pfaeffle commented 7 years ago

Good to hear that you found a solution! Perhaps there is an option for YUI Compressor, but I have not testet every minifier.