查找网站上使用的所有CSS样式 [英] Find all CSS styles used on website

查看:222
本文介绍了查找网站上使用的所有CSS样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个DotNetNuke皮肤有一个单一的CSS文件超过3500线长。它包含YUI,Telerik,Cluetip的样式以及网站的实际定制。旧的开发人员只是一直在添加样式,从未清理掉未使用的旧样式。

I have a DotNetNuke skin that has a single CSS file over 3,500 lines long. It contains styles for YUI, Telerik, Cluetip as well as the actual customisation of the site. The old developers just kept adding styles and never cleaned up the old unused ones.

我想清理文件并获得更大的可管理大小。我首先想到扫描代码库,但这是5,500个文件,混合使用的CSS应用于.aspx,.ascx和.cs文件以及jQuery aplying样式有时从生成的代码,有时从js文件。一些样式应用类选择器和其他具有id选择器。

I want to cleanup the file and get it to a more managable size. I first thought about scanning through the code base but this is 5,500 files with a mixture of CSS applied in the .aspx, .ascx and .cs files as well as jQuery aplying styles sometimes from generated code and sometimes from js files. Some styles are applied with class selectors and others with id selectors.

有一种方法,我可以轻松地检查网站实际需要在其所有的页面中的样式?

Is there a way I can easily check just which styles the website actually needs across all of its pages? Is there some crawler that could do this?

推荐答案

对于firefox,有一个加载项 dust-me-selectors 。如果您提供了一个站点地图,它会找到所有未使用的CSS样式。

For firefox there is an add-in called dust-me-selectors. If you provide a sitemap, it will find all unused css styles.

这篇关于查找网站上使用的所有CSS样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆