Best Bet CSS Practices
devgrow.com
Best Bet CSS Practices
1–8 of 8 posts
Re: Best Bet CSS Practices
#2Re: Best Bet CSS Practices
#3Re: Best Bet CSS Practices
#4down?
Re: Best Bet CSS Practices
#5down?
Re: Best Bet CSS Practices
#6Another tip I've found useful: sort your properties alphabetically within a selector.
Re: Best Bet CSS Practices
#7The 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.
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.
Re: Best Bet CSS Practices
#8The 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.
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:…