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)