Feed Sign in with OpenID OpenID

Simon Willison’s Weblog

The CSS Redundancy Checker. A tool for checking your markup for outdated CSS rules that don’t match any of your HTML. We were discussing the need for something similar to this at Torchbox a few weeks ago.

Tagged , , , , ,

2 comments

  1. I guess the trick then is to have some kind of naming scheme for rules that apply to dynamically generated markup that won't otherwise exist in your files.

    I often put a class of 'dynamic' on the body element when starting to apply JavaScript changes to a document - so I guess this tool could be tweaked to ignore any rules where the selector begins with body.dynamic (for example).

    Drew McLellan - 6th July 2007 14:01 - #

  2. Drew - totally; that's the way we do it at NPG (we put .js-enabled on the body element). Usually, I've been running the script and piping it into Textmate, where I just go through and delete the irrelevant lines with Command-G/Ctrl-Shift-K.

    I could add some kind of body-class-ignore functionality, but I'm wary of keeping it fully working.

    Tom Armitage - 6th July 2007 15:27 - #

Comments are closed.
A django site