

Best Bet CSS Practices - rrikhy
http://devgrow.com/best-bet-css-practices/

======
uggedal
The tip about indenting your CSS based on the hierarchy of the DOM it styles
is key. I've done this for a few years now and it makes coming back to a
stylesheet to make some changes a lot easier.

Another tip I've found useful: sort your properties alphabetically within a
selector.

~~~
treyp
hate to be a dissenter, but just want to put out another opinion. i work on
stylesheets every day, and i've found neither one very helpful. i'd spend more
time indenting and alphabetizing than working on styles. i don't know where
indenting would be too useful since you'd still have to scan the entire
document manually. ordering these in sections of the site in which they're
used has been most helpful for me.

my tip: use a decent IDE, like Aptana. it'll outline the stylesheet and make
definitions searchable and orderable. use whatever order you find most logical
for definitions and properties.

the TOC and commenting is probably useful for other members on your team,
though.

~~~
uggedal
I'm sitting in our 10.000 lines (don't ask) stylesheet as we speak and the
only thing keeping my sane is indenting and grouping (which the indenting
gives your for free) of related styles.

------
TheThomas
Google Cache:
[http://74.125.47.132/search?q=cache:vKjGHzc30OIJ:devgrow.com...](http://74.125.47.132/search?q=cache:vKjGHzc30OIJ:devgrow.com/best-
bet-css-practices/+http://devgrow.com/best-bet-css-
practices/&hl=en&client=firefox-a&gl=us&strip=1)

------
quizbiz
down?

~~~
mdolon
Sorry guys, I configured this VPS in a rush last week and it went down with
the traffic spike. Should be fixed now.

