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 trialStephen Blank
16,286 PointsBetter to put all the media queries in each selector instead of creating the them once and duplicating the selectors?
Using sass, is it better to put all the media queries in each selector instead of creating the media queries once and duplicating all of the selectors?
1 Answer
Erwin Meesters
15,088 PointsI think not, because if you want to change a media query from max-width:480px to let's say max-width:500px, you have to go through each and every element to implement this change. If you keep the media queries as containers with all the subjective elements in it, it's better to maintain and easier to change if necessary.
Stephen Blank
16,286 PointsStephen Blank
16,286 PointsWhat if you assigned your media query widths to variables that were defined at the top of the document? Would that make it acceptable?