我有一个拥有大约20个css文件的SharePoint服务器场,并且我确信它可以压缩到远远低于这个数量.但是,浏览每一页无疑会令人厌烦和愤怒. 那么有没有一个工具可以验证在网站/ webapp上
... . . 我有一个拥有大约20个css文件的SharePoint服务器场,并且我确信它可以压缩到远远低于这个数量.但是,浏览每一页无疑会令人厌烦和愤怒.
那么有没有一个工具可以验证在网站/ webapp上使用了多少css文件?
.解决方法
. 我唯一熟悉的是: http://unused-css.com/
.
A web crawler follows the links of your site. On each page,we retrieve the CSS files and list the selectors. The selectors are tested on the html page. If the selector matches an element,it is marked as used. When all the files have been visited,a new css file with only the used selectors is built. That’s the file you can download.
.我没有广泛使用它.
2012年9月6日更新:另一个有前景的工具 – Deadweight
.
Deadweight is a CSS coverage tool. Given a set of stylesheets and a set of URLs,it determines which selectors are actually used and reports which can be “safely” deleted.
.2013年1月29日更新:另一个新工具 – http://www.csstrashman.com/
.
The trashman examines your site’s live DOM and reverse engineers a new,more elegant definition that captures styles down to the pixel.
.. . .. ...