liveBook · Manning

Mobile-first layout

As explained in Web Design Playground

A responsive design approach that starts with styles for small screens and progressively enhances the layout for larger screens.

A mobile-first layout starts with the smallest practical screen, keeps only essential content, and adds complexity as more space becomes available. Think of it like seasoning: begin with a simple dish, then add enhancements instead of trying to remove them later. section 13.15

Build the layout in small steps:

  • Start with a minimal layout for a typical smartphone, often around 320 pixels wide—or use analytics to choose a more representative starting width. section 13.15
  • Include only elements essential to the user’s experience, especially when users may have slow connections or limited data plans. section 13.15
  • Add features, adjust sizes, and change the arrangement with media queries as the screen becomes wider. section 13.19
  • Combine the approach with relative measurements, a flexible grid, and responsive layout techniques. section 13.18

A small-screen baseline

Set compact heading sizes first, then enlarge them at 750 pixels: h1 starts at 2rem and becomes 2.5rem; h2 starts at 1.5rem and becomes 2rem; h3 starts at 1.25rem and becomes 1.5rem. The larger-screen rules add enhancement without requiring a separate mobile layout. section 14.9

h1 {
    font-size: 2rem;    #1  
}
h2 {
    font-size: 1.5rem;    #1  
}
h3 {
    font-size: 1.25rem;    #1  
}
@media (min-width: 750px) {
    h1 {
        font-size: 2.5rem;    #2  
    }
    h2 {
        font-size: 2rem;    #2  
    }
    h3 {
        font-size: 1.5rem;    #2  
    }
}

Browse the complete CSS example showing mobile-first heading sizes and their larger-screen overrides. section 14.9

How Web Design Playground covers it

How deep it goes
Explains the baseline, content priorities, and media-query progression, but does not detail every responsive typography or image technique.
Examples
Uses a 320-pixel smartphone baseline and responsive heading sizes that change at a 750-pixel breakpoint.
What it assumes
Assumes basic CSS layout work while teaching the mobile baseline and enhancement strategy directly.
What you can do after
Apply it via CSS media queries to build a smartphone layout and progressively enhance it for wider screens.
How it connects
Connects mobile-first layout with responsive web design, media queries, relative measurements, flexible grids, and liquid layouts.

Also explained in

Compare how 4 books explain mobile-first layout →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Web Design Playground. The section links point to the parts of the book it draws on.