YUI Compressor has a known bug where some media queries, including those used to serve styles to iOS and Android devices (e.g. @media screen and (max-device-width: 480px) {...}), are broken when compressed, because the space between the and and the opening brace is removed.
The latest version available for download from the homepage (2.4.2) still has this issue.
Is there an updated version available where this issue is fixed?
Yes — this issue is fixed in 2.4.4, which is downloadable from YUI Compressor’s git project:
This version seems to work, at least on Mac OS X 10.6.4.
Instructions:
antand hit return. This will create a folder calledbuild, and put the built jar file in it. The built jar file is calledyuicompressor-2.4.5pre.jarchmod +x yuicompressor-2.4.5pre.jarto make the jar file executable./usr/local/bin/.profilefile to make it easier to run, e.g.alias yuic="java -jar /usr/local/bin/yuicompressor-2.4.5pre.jar"