CSS Architecture

October 8th, 2005

This article
discusses how you should architect your CSS. I currently lay out my CSS
by having one common CSS file which contains the rules which all pages
may use. This is imported using CSS’s @import rule in an inline style
block. Older browsers don’t support @import, but let’s be honest -
older browsers also support CSS pretty badly so it’s better they get an
unstyled page than a badly styled one.

Putting your “attributes”
in alphabetical order is a good idea - this is something I need to do
myself. It’d probably also make sense for me to group and
alphabetically order by CSS rules as well - it’s quite a mess at the
moment :)

This article also clears up some confusion over CSS specificity.

  • Uncategorized
  • Comments(0)

Related Posts

  1. document.getElementsByClassName compatibility
  2. PHP: Determining if a server/domain/IP is internal
  3. Geneone Updates
  4. hAtom microformat
  5. Facebook

Trackback URI | Comments RSS

Leave a Reply