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

Minifying Calc() function with "+" #68

Open ciekals11 opened 4 years ago

ciekals11 commented 4 years ago

Summary: minifying to minified file as well as direct minify makes function Calc() with "+" sign to minify wrongly for example "Calc(50% + 80px)" is minified to "Calc(50%+80px)" which is not recognised as browsers.

Steps to reproduce:

  1. create selector that uses "Calc" function and use "+" sign
  2. minify file with "YUI Compressor"

Expected result: Selector

.foo {
    width: Calc(50% + 80px);
}

Should be minified into

.foo{width:Calc(50% + 80px)}

Actual result:

.foo{width:Calc(50%+80px)}
ciekals11 commented 4 years ago

chenging version of "YUI compress" from 2.4.7 to 2.4.9 seems to resolve the problem