Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.


Refactoring media queries seems very undry.

Putting the media queries under each specific element seems very undry to me. I can't see the point to putting all these queries in separate areas instead of just having 1 main media query per screen size. This lets me see all my responsive adjustments in one place.

I know he likes seeing his entire code together but separating them makes looking through my MQ's very tedious if something breaks.

1 Answer

Glenré Charl Labuschagné
Glenré Charl Labuschagné
23,202 Points

Hi Bridger,

It's a case of personal preference. Personally having to scroll up and down through hordes of media queries looking for all the instances of the class you need to update isn't ideal. Having little batches, works better in my opinion and is my preference (learn to love Sass and the includes functionality). Also you shouldn't develop/design for screen sizes: you should work for mobile first and only adjust where needed, because device/screen sizes are constantly changing—and so should we.