Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

Mike Schaming
Mike Schaming
13,925 Points

Best Practices for Organizing CSS

Hi Community! I was wondering if anyone would share their best practices for organizing their CSS file. Do you prefer to try to organize everything in relation to the document flow? Or group your base styles, and class styles together?

I feel like I start with good intentions of keeping some sort of organization to my styles, but by the end, my stylesheet just feels like a mess.

Any tips or best practices on organization would greatly be appreciated!

Thanks!

1 Answer

james south
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
james south
Front End Web Development Techdegree Graduate 33,271 Points

i just start at the top of the markup and work down in parallel in the css. header at the top, etc. then in media queries, same thing, top down. seems to work fine.

Mike Schaming
Mike Schaming
13,925 Points

Thanks James- I appreciate the feedback!