Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Status
colourRed
titleinvalid
 - Known issue reported in https://davidwalsh.name/yui-compressor-media-query-error where space between "and (" gets removed making CSS invalid.

Code Block
languagecss
titleCompressed File Using YUICompressor 2.4.2
linenumberstrue
@media screen and(min-width:480px) and(max-width:639px){body{background:#000 url(/themes/advanced/img/header-bg.png) no-repeat top left;}}@media screen and(max-width:640px){body{background:#000 url(/themes/advanced/img/header-bg.png) no-repeat top left;}}

...

Code Block
languagecss
titleMinified using PHPMinCompressed File Using YUICompressor 2.4.8
linenumberstrue
@media screen and (min-width: 480px) and (max-width: 639px){body{background:#000 url(/themes/advanced/img/header-bg.png) no-repeat top left;}}@media screen and (max-width: 640px){body{background:#000 url(/themes/advanced/img/header-bg.png) no-repeat top left}}

...

;}}

Status
colourGreen
titlevalid

Code Block
languagecss
titleMinified using PHPMin
linenumberstrue
@media screen and (min-width: 480px) and (max-width: 639px){body{background:#000 url(/themes/advanced/img/header-bg.png) no-repeat top left}}@media screen and (max-width: 640px){body{background:#000 url(/themes/advanced/img/header-bg.png) no-repeat top left}}

Solution

  1. use https://github.com/kriswallsmith/assetic library for asset file creation (internals of "m_Compress" tag)
  2. use JsMin and CssMin from Composer
  3. deprecate "JsMinifyHelper" and "CssMinifyHelper" classes in favor of "MinifyHelper::compressString" method
  4. store compiled assets in "/system/cache/assets/" folder instead of "/system/cache/" folder
  5. upgrade used YUICompressor version from 2.4.2 to 2.4.8

Related Discussions

...