CSS organization

Douglas Bowman's Stopdesign | Staying organized

sections in my CSS files that are almost always present:

+ page structure
+ links
+ header
+ footer
+ lists, etc.

Those sections are always demarcated by commented text and lines created by dashes. This way, I almost always know where a certain rule should go, or where to find one when I want to edit or troubleshoot.

order of properties within each declaration block.

+ Backgrounds always go first
+ position or float information
+ width/height measurements
+ margin/padding/border
+ text formatting and color.

Not every one of those properties is always present, but that%u2019s the general order I usually try to follow. I%u2019m usually not even conscious I%u2019m doing it by now.

Item originally posted to a defunct personal wordpress installation