問題描述
我知道有一個名為 Dust-Me Selectors for Firefox 的擴展,而且它不查看 JavaScript 生成的動態 HTML.
I know there is an extension called Dust-Me Selectors for Firefox and also that it doesn't look at dynamic HTML generated by JavaScript.
我正在尋找可以從樣式表中識別所有未使用的選擇器的工具,這些選擇器附加到多個頁面,并且所有 JavaScript 都在運行并檢查選擇器?我現在知道的唯一選擇是手動檢查文件并找到未使用的選擇器:(
I'm looking for tool(s) that can identify all unused selectors from a stylesheet, attached to several pages, with all the JavaScript running and checking selectors? The only option I know right now for this is manually checking files and finding unused selectors :(
在 IDE 中 - 我相信 NetBeans 在編寫 Java 代碼時會在未使用庫時提供警告消息.如果沒有 IDE(NetBeans、Eclipse、Dreamweaver 等)插件來搜索選擇器,我的選擇是什么?
In IDE's - I believe NetBeans provides a warning message when writing Java code, if a library is not under use. Without an IDE (NetBeans, Eclipse, Dreamweaver, etc) plugin to search for the selectors what are my options?
另外,是否有工具可以檢查同一文件中未使用的選擇器.我的意思是如果所有的 JS、HTML 和 CSS 代碼都在同一個文件中.
Also, is there a tool to check for unused selectors in the same file. I mean if all the JS, HTML and CSS code is in the same file.
推薦答案
我認為 http://unused-css.com 會做你想做的事.
I think that http://unused-css.com will do exactly what you want.
https://github.com/geuis/helium-css可以幫忙
以及:http://razorfast.com/2010/11/21/announcing-cssess-the-bookmarklet-that-finds-unused-css-selectors/
這篇關于檢查未使用的 CSS 選擇器的工具?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!