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!
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
Amandeep Pasricha14,932 Points
Why do I only create two media queries, as opposed to adding a separate one for mobile devices?
If I'm creating a media query for tablets, and then desktops, what I don't get is...how will I know that I will get the desired design for my mobile design? Aren't you supposed to design a separate layout for the mobile media query?
Jennifer NordellTreehouse Teacher
Hi there, Amandeep Pasricha ! The "mobile first" approach may seem a little counter-intuitive at first because we do development on computers, right? As late as around 2010 most web browsing was still done on desktops (though I need a more credible source on that). Today over 75% of web browsing happens on mobile devices. What this means is that we used to always assume that the CSS would be displayed on a desktop by default. Today, we assume that it will be displayed on a mobile device by default.
This means that your base CSS should be designed for a mobile phone while your media queries should handle the outliers which in this day and age, are tablets and desktops
Hope this helps!