有没有一个版本的YUI Compressor正确处理媒体查询? [英] Is there a version of YUI Compressor that deals correctly with media queries?

查看:123
本文介绍了有没有一个版本的YUI Compressor正确处理媒体查询?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

YUI Compressor有一个已知的错误,其中一些媒体查询,包括那些用于向iOS和Android设备提供样式(例如 @media screen和(max-device-width:480px){... } )在压缩时被破坏,因为和开始大括号之间的空格被删除。

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.

  • http://yuilibrary.com/projects/yuicompressor/ticket/2527991

可从首页(2.4.2)下载的最新版本仍有此问题。

The latest version available for download from the homepage (2.4.2) still has this issue.

  • http://yuilibrary.com/downloads/#yuicompressor

此问题是否有更新版本?

Is there an updated version available where this issue is fixed?

推荐答案

是的 - 这个问题已修复在2.4.4,可以从YUI Compressor的git项目下载:

Yes — this issue is fixed in 2.4.4, which is downloadable from YUI Compressor’s git project:

  • https://github.com/yui/yuicompressor/archives/yuicompressor-33

此版本似乎有效,至少在Mac OS X 10.6.4上。

This version seems to work, at least on Mac OS X 10.6.4.

说明:


  1. 从上述页面下载压缩的来源,然后解压缩。

  2. 在终端中,切换到解压缩的源文件夹。

  3. 键入 ant 这将创建一个名为 build 的文件夹,并将构建的jar文件放入其中。生成的jar文件名为 yuicompressor-2.4.5pre.jar

  4. 切换到构建文件夹,并运行
  5. 可选地,将jar文件移动到 /
  6. usr / local / bin /
  7. 也可以在 .profile 文件中创建别名更容易运行,例如 alias yuic =java -jar /usr/local/bin/yuicompressor-2.4.5pre.jar

  1. Download the zipped source from the page above, and unzip it.
  2. In the Terminal, change into the unzipped source folder.
  3. Type ant and hit return. This will create a folder called build, and put the built jar file in it. The built jar file is called yuicompressor-2.4.5pre.jar
  4. Change into the build folder, and run chmod +x yuicompressor-2.4.5pre.jar to make the jar file executable.
  5. Optionally, move the jar file into /usr/local/bin/
  6. Optionally, create an alias in your .profile file to make it easier to run, e.g. alias yuic="java -jar /usr/local/bin/yuicompressor-2.4.5pre.jar"

这篇关于有没有一个版本的YUI Compressor正确处理媒体查询?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆