8 Jan 2009, 8:54am
General
by

Comments Off

How do you deal with a mess in your CSS?

Quick question. If you have multiple devs working on a few different screens, each monkeying with CSS, it takes very little time to end up with a huge mess of CSS. How do you deal with that? Do you:

  1. Delete the CSS and start again defining a common sheet?
  2. Try to optimize the CSS.
  3. Live with it.
  4. Don’t ever let dev’s touch CSS… they are dirty.

I ran into a 6000+ line CSS file for a dozen pages. They each have some heavy js UI going on but 6000 lines? An auto-optimizer cut it to 2200 or so pretty quickly but you can’t work with that file. I decided to start again, clean.

The upside is that I know the site mostly works without CSS and it exposed some odd decisions with some of the HTML (yay for nekkid web sites). The downside is that we may have to deal with browser bugs all over again—but then again we do not support IE 6. Only IE 7+, FF (latest), Safari (latest).

Feature request for Dreamweaver CS5 – something to optimize my CSS!