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 trialLeigh Maher
21,830 PointsShouldn't we be designing for mobile first?
It occurred to me when Guil introduces the media queries by using max-width, that he's building this site for desktop first and then adjusting for smaller viewports. Shouldn't we be designing for mobile first, and then use min-width media queries to adjust it for the larger viewports?
3 Answers
Ryan Field
Courses Plus Student 21,242 PointsIt really depends on the situation. In general, building a site from a mobile-first approach is a good practice. Some sites, however, don't need a mobile version, in which case such an approach isn't needed. So, it's a good practice to be aware of, but it's not absolutely necessary depending on the situation.
When designing from a mobile-first approach, though, you're entirely correct that min-width
media calls are better than max-width
.
VISHAL DEEPAK
3,272 PointsThis is only because we are using bootstrap.
Mohamud Sheikh Ibrahim
8,006 PointsBecause bootstrap takes care of different devices once you have the right set-up
Leigh Maher
21,830 PointsLeigh Maher
21,830 PointsThanks Ryan. In this instance we are designing a responsive site (otherwise there would be no need for media queries).
Guil seems to promote the mobile first approach in his other courses. It would be interesting to find out why he approaches it differently here.