侧边栏壁纸
博主头像
落叶人生博主等级

走进秋风,寻找秋天的落叶

  • 累计撰写 130562 篇文章
  • 累计创建 28 个标签
  • 累计收到 9 条评论
标签搜索

目 录CONTENT

文章目录

检查未使用的CSS样式和覆盖范围的工具?

2023-03-28 星期二 / 0 评论 / 0 点赞 / 72 阅读 / 1363 字

我有一个拥有大约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.

.. . .. ...

广告 广告

评论区