Freakish CSS

Reading Doug’s post about organisation I noticed that he codes is classes in almost exactly the same order I do.

After writing so much CSS, I’m even a little anal as to the order of properties within each declaration block. Backgrounds always go first. Then position or float information. Then width/height measurements. Then margin/padding/border. Then text formatting and color. Not every one of those properties is always present, but that’s the general order I usually try to follow. I’m usually not even conscious I’m doing it by now.

I’ve used his tutorials quite a bit through the years, I wonder if I picked it up uncounsciously or just came to the same analness on my own. I know, second completely useless post this morning. Trying to make it a bit more useful; anyone else who codes css have a preferred order for things?

Learn more

2 Replies

Reply section is closed.