DEV Community

Discussion on: Do you code mobile-first?

Collapse
 
brandonwallace profile image
brandon_wallace • Edited

I start projects mobile first. It is easier to start at the mobile size in my opinion.
It is a nice challenge of getting a design to look good on a small screen. I even check mobile landscape view for when the phone is turned sideways.

@media only screen and (orientation: landscape) and (min-height: 320px) and (max-width: 600px) {
    /* code */
}
Enter fullscreen mode Exit fullscreen mode

The key is to make a drawing of the way it will look on mobile, tablet, and desktop before writing code.

I think that older developers go desktop first and newer developers lean more towards mobile first.