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

Norwood, Randy randy.norwood at ttu.edu
Wed Sep 12 12:15:13 EDT 2007


That's true for a simple class or id: I can look for occurrences of
class="footnote" or whatever. However, this can't be done if, for
example, it's a "descendant" selector, such as:

div p { color: red; }

...because there is no class or id attribute in the HTML, just a
<div>text<p>more text</p>more text</div>.

This would seem to require parsing all of the site's HTML documents
programmatically, and finding a given selector in that document's
structure. I could probably build something in Perl, but it would be
nice if someone has already done this.




-----Original Message-----
From: Cary Gordon [mailto:listuser at chillco.com] 
Sent: Wednesday, September 12, 2007 11:03 AM
To: Norwood, Randy
Cc: web4lib at webjunction.org
Subject: Re: [Web4lib] Tool to show where/whether CSS classes and IDs
are being used?

Not much sophistication, but if you use *nix, Darwin, or even Windows  
with Cygwin, you can grep for them from the command line.

Cary Gordon
The Cherry Hill Company
http://www.chillco.com


On Sep 12, 2007, at 8:25 AM, Norwood, Randy wrote:

> Is anyone aware of a tool (preferably open source) that can analyze a
> web site and its stylesheets, and identify where (on what pages) a  
> given
> CSS selector is being used?
>
>
>
> This would be useful, for example, if one wished to modify the style
> associated with a given selector--you could view the results of the
> change on all of the pages where that style is applied and be  
> reasonably
> certain that nothing has broken.
>
>
>
> I have looked at a CSS editing and management program called TopStyle
> which has this capability. However, it seems a bit buggy, and it is  
> abit
> expensive ($80).
>
>
>
> thanks,
>
>
>
> --
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Randy Norwood
>
> Sr Programmer/Analyst
>
> Texas Tech School of Law Library
>
> Office: 806-742-3990 x350
>
> Support: 806-742-3990 x318, computersupport.law at ttu.edu
>
> E-mail: randy.norwood at ttu.edu
>
>
>
> _______________________________________________
> Web4lib mailing list
> Web4lib at webjunction.org
> http://lists.webjunction.org/web4lib/
>



More information about the Web4lib mailing list