[thelist] Identifying Orphaned CSS Styles

Drew Shiel ashiel at sportsinteraction.com
Thu Jun 15 09:26:44 CDT 2006


  Hi folks;

  I'm sure this has come up for someone before. We've a fairly large site,
which uses about six different CSS files. Some of these files are suffering
from a certain degree of bloat, and I know that some of the defined styles
are no longer in use. 

  Is there any way to easily identify which styles are no longer in use
anywhere on the site? Ideally, this will be some software or spider, but
even a suggestion as to a methodology to write a script of our own to work
it out would be good. 

  The major problem is that a developer who worked here for a while was fond
of carefully positioning unique elements of a page, and dumping the
necessary CSS into the site-wide style sheets. Many of those unique elements
have been changed by now, but the styles are still there, and have
uninformative names like "infobar".

  Cheers,
  Drew.




More information about the thelist mailing list