Hacker News new | ask | show | jobs
by STHayden 5555 days ago
To be honest. With firebug's ability to tell me what line and css files the style on an element is coming from I don't find spending a lot of time on organization to have a ton of benefit.
1 comments

While I love Firebug, I'd have to counter that organization with CSS is actually quite important (and does have its benefits!)

This is especially true when you're working either in a team environment or on a large site. The very nature of CSS (and how things cascade down) can become a nightmare when organization isn't taken into account from the start.

I agree completely, especially on a web app that is constantly growing. 2 on-the-job things that help me the most are:

1. Using the 960 grid system (or your preferred grid flavor) 2. Grouping by the following:

Body Typography Forms (Other global stuff like links and buttons) /* Layout Element 1 / ID1 {} ID2 {} class1 {} class2 {} / Layout Element 2 */ ID3 {} ID4 {} class3 {} class4 {}

I also write my styles on one line, but that's just personal preference. I find it easier to scan down for the selector, then across for the property I want. I definitely don't do it for aesthetics or file size ;)