[Web4lib] RE: Tool to show where/whether CSS classes and IDs are being used?

Kozlowski,Brendon bkozlowski at sals.edu
Fri Sep 14 14:00:41 EDT 2007


[...]
 
> Another example: stylesheets gradually accumulate style selectors that
> are no longer used--maybe they were put in there during site development
> and were never removed. If I want to clean up my stylesheet and remove
> all of the selectors that are not being used, how do I identify the ones
> that are not being used anywhere on my site?

> Thanks
> Randy
 
Randy, your initial question made me think of something but it didn't quite fit...however, *this* question fits.
http://www.sitepoint.com/blogs/2007/07/30/find-unused-css-selectors-with-dust-me-selectors/
 
This should be what you're looking for.  It is a client-side Firefox add-on.  (Though I think you have to manually visit each page, read the article to be sure.)  Either way, you never really specified whether you were looking for a client-side or server-side solution.  For a list of those pages, I suppose the internal database that this extension uses could be looked at, or the extension's code itself could be reworked to do what you like.
 
 
Brendon Kozlowski
Web Administrator
Saratoga Springs Public Library
49 Henry Street
Saratoga Springs, NY, 12866
[518] 584-7860 x217



More information about the Web4lib mailing list