As a web developer, one of the things I struggle with is keeping my CSS files from becoming a complete disaster. I’m sure that some of you reading this share my pain. A couple days ago, I ran across a post by Emil Stenström about what he calls the Tree Method.

Overall, it seems to make a lot of sense. The only thing I might object to is organizing properties alphabetically. Grouping related properties makes more sense to me, even though it often means I’m not totally consistent with how I order them.

So, I ask those of you who are good with CSS (I know that at least one of you are): Would you recommend this method? What would you tweak to make it better? Do you have another method that you feel is better?

Posted in Miscellaneous

2 Responses to

  1. Yeah, I would recommend it :P

    Alphabetic ordering or not is really not that important, I just hate coming to a new project and finding that the CSS is a mess. Everything but a mess is better :)

  2. Lindsey says:

    Actually, I’m all for alphabetical organization. That way, it’s easier to tell at a glance whether the property you’re looking for is there or not. But I guess that if you don’t have the property names pretty much committed to memory, then grouping related properties might be better.

    sigh My CSS has gotten pretty rusty in the last six months. That style sheet I did for the last CR might have been my high point — and that was far from perfect.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>