CSS 壓縮工具 rCSSmin

fmms 12年前發布 | 30K 次閱讀 CSS 前端技術

RCSSmin 是一個 CSS 壓縮工具,基于 YUI compressor 的語義實現。提升了壓縮的速度和比例。

以下是它的一些功能特性:

  • Strings are kept, except that escaped newlines are stripped
  • Space/Comments before the very end or before various characters are stripped: :{});=>+],! (The colon (:) is a special case, a single space is kept if it’s outside a ruleset.)
  • Space/Comments at the very beginning or after various characters are stripped: {}(=:>+[,!
  • Optional space after unicode escapes is kept, resp. replaced by a simple space
  • whitespaces inside url() definitions are stripped
  • Comments starting with an exclamation mark (!) can be kept optionally.
  • All other comments and/or whitespace characters are replaced by a single space.
  • Multiple consecutive semicolons are reduced to one
  • The last semicolon within a ruleset is stripped
  • CSS Hacks supported:
    • IE7 hack (>/**/)
    • Mac-IE5 hack (/*\*/.../**/)
    • The boxmodelhack is supported naturally because it relies on valid CSS2 strings
    • Between :first-line and the following comma or curly brace a space is inserted. (apparently it’s needed for IE6)
    • Same for :first-letter
    </li> </ul>

    項目主頁:http://www.baiduhome.net/lib/view/home/1325587796093

 本文由用戶 fmms 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!