CSS值排序工具:postcss-ordered-values
postcss-ordered-values 將是一個具有歷史意義的插件,從此 CSS 不僅有了屬性排序工具還有了值排序工具。這給 CSS 壓縮工具帶來更好的 GZip 壓縮率.
Install
With npm do:
npm install postcss-ordered-values --save
Example
Some CSS properties accept their values in an arbitrary order; for this reason, it is entirely possible that different developers will write their values in different orders. This module normalizes the order, making it easier for other modules to understand which declarations are duplicates.
Input
h1 { border: solid 1px red; border: red solid .5em; border: rgba(0, 30, 105, 0.8) solid 1px; border: 1px solid red; }
Output
h1 { border: 1px solid red; border: .5em solid red; border: 1px solid rgba(0, 30, 105, 0.8); border: 1px solid red; }
Support List
For more examples, see the tests.
- border(border-left|right|top|bottom)
- outline
- flex-flow
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!