Firefox addon to find Unused CSS styles [duplicate]

爱⌒轻易说出口 提交于 2019-12-07 11:23:55

问题


Possible Duplicate:
Tool to identify unused css definitions

Lets say I have a page displayed in my browser and I have a .CSS file used on this page with rules like

    .class1{
    /* some style definitions */
    }
    .class2{
    /* some style definitions */
    }
    .class3{
    /* some style definitions */
    }
....
...
.class1001{
    /* some style definitions */
    }

Now my question is is there any addon which would tell me like out of these rules, which are "NOT USED" on the page..

I saw some related questions which provide links to addon that tell CSS selectors which are used on a page..But I have like 1000+ rules and hence want to directly know RULES which are NOT used..

JUST TO ADD, the addons mentioned have 1 issue; Like if there are hacks for IE (e.g. *html), it marks them as UNUSED, even though it is actually used in IE. Is there any workaround for this ?

Please help me. Thank you.


回答1:


If you use Firefox, you can use the Dust Me Selectors plugin that does exactly what you asked for. It finds unused Selectors for you :) Give it a try!

Also there is the CSS Usage plugin, that looks over your CSS file and tells you which ones are not being used. :)




回答2:


CSS usage.




回答3:


Try this:
http://unused-css.com/

Also try:
https://addons.mozilla.org/en-US/firefox/addon/dust-me-selectors/



来源:https://stackoverflow.com/questions/7147441/firefox-addon-to-find-unused-css-styles

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!