[Web4lib] Tool to show where/whether CSS classes and
IDsare beingused?
Bret Parker
Bret.Parker at ci.stockton.ca.us
Wed Sep 12 14:54:01 EDT 2007
Seems like Cary Gordon's grep suggestion could be scripted with reg expressions.
The problem you shared about the nested elements, though, would be hard to catch with that method.
XSLT is promising if you're using xhtml, but have not had success with this across many pages at once. In batch processing attempts I came to pages that though it validated through an XML validation checker, it choked on the XSLT processor. If anyone has had better luck with a similar approach, please share.
Bret Parker, Senior Applications Programmer Analyst (MLIS)
Stockton-San Joaquin County Public Library
605 N. El Dorado St
Stockton, CA 95202
bret.parker at ci.stockton.ca.us
(209) 937-7148
http://www.stockton.lib.ca.us
Stockton Reads!
>>> "Norwood, Randy" <randy.norwood at ttu.edu> 9/12/2007 11:34 AM >>>
Thanks for all of the replies.
However, I may not have explained the problem very well. I do use the FF
Web Developer toolbar, but unless I'm missing something obvious, it is
suitable for working with one page at a time, for diagnosing style
problems and for fine-tuning stylesheet changes, etc.
Say that I have a stylesheet that is used on all 500+ pages on my site.
And there is a frequently-used style that controls how <ul> lists are
displayed. If I change that style in the stylesheet, the result might
look OK, or it might not, depending on the context--maybe the spacing
between the <li> elements would be too large, or too narrow. I won't
know except by looking at it in different browsers. The problem is, How
do I identify all of the pages on my site that happen to use that style,
so I can check them to make sure they look OK?
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
-----Original Message-----
From: web4lib-bounces at webjunction.org
[mailto:web4lib-bounces at webjunction.org] On Behalf Of Richard Cox RLCOX
Sent: Wednesday, September 12, 2007 12:44 PM
To: web4lib at webjunction.org
Subject: RE: [Web4lib] Tool to show where/whether CSS classes and IDsare
beingused?
Ditto the FF Web Dev Toolbar You would be especially interested in the
outlining of elements, "Display ID and Class Details" and "View Style
Information" options.
Richard
Digital Technology Consultant
Electronic Resources & Information Technology
University Libraries, UNC Greensboro
http://library.uncg.edu/
"Pons, Lisa (ponslm)" <PONSLM at UCMAIL.UC.EDU>
Sent by: web4lib-bounces at webjunction.org
09/12/2007 12:46 PM
To
"Norwood, Randy" <randy.norwood at ttu.edu>, <web4lib at webjunction.org>
cc
Subject
RE: [Web4lib] Tool to show where/whether CSS classes and IDs are
beingused?
Others will chime in, but the web developer toolbar for firefox can do
this sort of (outline current element-as you mouseover), as well as lots
of other cool things.
> -----Original Message-----
> From: web4lib-bounces at webjunction.org
> [mailto:web4lib-bounces at webjunction.org] On Behalf Of Norwood, Randy
> Sent: Wednesday, September 12, 2007 11:26 AM
> To: web4lib at webjunction.org
> Subject: [Web4lib] Tool to show where/whether CSS classes and
> IDs are beingused?
>
> 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/
>
_______________________________________________
Web4lib mailing list
Web4lib at webjunction.org
http://lists.webjunction.org/web4lib/
_______________________________________________
Web4lib mailing list
Web4lib at webjunction.org
http://lists.webjunction.org/web4lib/
_______________________________________________
Web4lib mailing list
Web4lib at webjunction.org
http://lists.webjunction.org/web4lib/
More information about the Web4lib
mailing list