CKStyle 是一个CSS的解析、检查、修复、压缩工具集。之前是 Python版本 的,经过一段时间的改造升级,目前是JS版本。
支持Nodejs命令行工具、编辑器插件、官网在线编辑、CKService检查等多种功能。
官网在这里:http://ckstyle.github.io
[sudo] npm install -g ckstyle
/* 示例 */
.test {-webkit-transition: 1s; -moz-transition: 1s; _width:10px; *color:#ffffff; padding:0;
padding-top: 20px }
ckstyle compress -p --browsers="ie6,ie7,ie,chrome,firefox,safari,opera" ./test.css
===>
firefox : .test{padding:20px 0 0;-moz-transition:1s}
chrome : .test{padding:20px 0 0;-webkit-transition:1s}
ie7 : .test{padding:20px 0 0;*color:#FFF}
ie6 : .test{_width:10px;padding:20px 0 0;*color:#FFF}
opera : .test{padding:20px 0 0}
safari : .test{padding:20px 0 0;-webkit-transition:1s}
ie : .test{_width:10px;padding:20px 0 0;*color:#FFF}
更多使用,请上官网 http://ckstyle.github.io/#startup
一次点击,分析任何网站的CSS。
以 淘宝网
为例:
更多使用,请上官网 http://ckstyle.github.io/#service
CKStyle 遵循 MIT LICENSE