Thursday, December 06, 2007

Link: Sexy Stylesheets

Cool post on Vitamin: Creating Sexy Stylesheets I've thought about this stuff a lot in the creation of my own stylesheets, but it's cool to see it explicitly written. I started organizing my css properties a couple weeks ago. Here's what I was doing: #subNav{

  1. Display props
  2. Dimentions
  3. Margins
  4. Padding
  5. Border
  6. Background
  7. Typography
} Basic logic being that I'm putting properties that affect layout first. You could argue that font-size impacts layout more than background, but I wanted to keep font properties together. And it makes sense to keep background near border. I've been using inheritance-based tabbing to keep my CSS source readable after looking at SASS. It's working pretty well, and I don't have to make nearly as many comments to keep it all straight.

No comments: