Adam Stacoviak

shame.css -- a best practice for handling CSS hacks

Harry Roberts (aka CSS Wizardry) isn't advocating writing "hacky" CSS, he's advocating a best practice for handling them.

From his post on the subject:

The idea of shame.css is that you have a totally new stylesheet reserved just for your hacky code. The code you have to write to get the release out on time, but the code that makes you ashamed.

As Harry mentioned in his article, putting your CSS hacks and quick-fixes in their own file called shame.css you do a few things:

  1. You make them stick out like a sore thumb
  2. You keep your 'main' codebase clean
  3. You make developers aware that their hacks are made very visible
  4. You make them easier to isolate and fix.
  5. $ git blame shame.css

I don’t know about you, but Harry had me at git blame.


Sign in or Join to comment or subscribe

Player art
  0:00 / 0:00