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

JavaScript AJAX Basics (retiring) AJAX and APIs Displaying the Photos

Over 2000 lines of CSS? Grids?

I have just a quick question about the CSS file for this video. It contains an intimidating 2000 lines of code, with a lot of grid classes. I'm just wondering if this is normal and/or necessary? Would one person write all of this, or is it a framework like Bootstrap? Thanks!

2 Answers

You'll usually find a grid system you like and stick with it using the same file between projects. Whether that's something you found in a framework or created yourself through the course of working on various projects depends on you.

CSS can quickly get to be fairly intimidating in size but thankfully there are some tricks to keep it manageable such as sticking to a selector naming convention [1], using a CSS pre-processor [2], and as you mentioned relying on frameworks to do some of the heavier lifting.

Hope that helps!

  1. Examples of naming conventions include: BEM, SMACSS, OOCSS, and others.
  2. CSS pre-processors such as SASS/css and LESS allow for creating functions, better includes, and various other features to help DRY up your CSS.

Thank you for the response!