For a long time, websites were built for desktops and then squeezed down to fit phones as an afterthought. The result was usually a compromised mobile experience, because the design started from a big screen and had to have things stripped out or rearranged to work on a small one. Mobile-first design flips that order. You start with the smallest screen, get it right, and then progressively add to the design as the screen grows. It sounds like a small change in sequence, but it changes the quality of the result in a meaningful way.
The Core Idea
Mobile-first means writing your base CSS for mobile devices, then using media queries to layer on styles for larger screens. The mobile styles are the foundation that applies everywhere, and everything beyond that is an enhancement added as more screen space becomes available.
This ordering produces several benefits that all stem from the same root. Performance improves because your base stylesheet is lean, holding only what a mobile device needs, which matters on slower mobile networks. The user experience improves because you are forced to prioritise the most important content and functionality from the start, rather than cramming a desktop design into a phone. And the whole approach embodies progressive enhancement: you build up from a solid, simple core instead of tearing down from a complex one.
Starting with the Base
The first step is to write your default styles targeting mobile. These rules are not wrapped in any media query, so they apply universally and act as the foundation for every screen size:
body { font-size: 16px; padding: 10px; margin: 0;}.container { display: block; width: 100%;}
Notice what these styles assume: a single column, full width, modest spacing. This is the natural shape of a mobile layout, content stacked vertically and filling the narrow screen. There is no complex multi-column arrangement to undo later, because we are starting from the simplest case and only adding complexity where there is room for it.
Building Up with min-width
The enhancement happens through media queries, and the key detail is using min-width rather than max-width. A min-widthquery applies its styles when the screen is at least a certain width, which means it adds to the mobile base as the screen grows:
@media (min-width: 768px) { body { font-size: 18px; } .container { width: 750px; margin: 0 auto; }}@media (min-width: 1024px) { body { font-size: 20px; } .container { width: 960px; }}
Read this from top to bottom and you can see the design growing. The mobile base gives the container full width. At 768 pixels and up, it takes on a fixed width and centres itself. At 1024 and up, it grows wider and the text scales up to suit the larger screen. Each query builds on what came before rather than fighting it.
This is the conceptual heart of mobile-first, and it is worth pausing on. In a desktop-first approach using max-width, each query overrides the larger design to shrink it down, which means you are constantly undoing styles. In mobile-first with min-width, each query adds to a smaller design to grow it up. Adding is cleaner than overriding. The CSS reads as a logical progression from small to large, and there is far less style conflict to track.
Working Mobile-First Well
Prioritise content from the start. Because you are designing for the most constrained screen first, you have to decide what genuinely matters. That discipline tends to produce a clearer, more focused design that then scales up nicely, rather than a cluttered one that barely fits on a phone.
Embrace progressive enhancement as the mindset, not just the technique. Begin with a simple, fast design that works for everyone, then add richness for the devices that can handle it. The mobile experience never suffers for the sake of the desktop one, because the mobile experience came first.
Use relative units throughout. Percentages, em, and rem let your design scale smoothly across the range of devices between your breakpoints. Fixed pixel values fight against the fluid, adaptive quality that mobile-first design is trying to achieve.
Structure your media queries to build up, not tear down. Using min-width consistently keeps your CSS logical: a base layer followed by progressive additions. This is more maintainable than a tangle of max-width overrides, because anyone reading it can follow the design growing from small to large.
Test on real devices across the range. Emulators and browser resizing catch a lot, but actual phones, tablets, and desktops reveal things that simulated environments miss, especially around touch interaction and real network speeds.
The Takeaway
Mobile-first design is about sequence: build a strong, optimised base for the smallest screen, then enhance it for larger ones using min-width media queries. The order matters because adding styles as the screen grows is cleaner and more maintainable than stripping styles away as it shrinks. The approach naturally produces leaner, faster mobile experiences, forces useful prioritisation of content, and keeps your CSS readable as a progression from simple to rich. Start small, lean on relative units, build upward, and test widely, and you end up with a design that serves the phone in someone’s hand just as well as the monitor on their desk.
See you soon
[…] Why You Should Design for Mobile First […]
[…] white background, a subtle shadow, consistent spacing, and a blue button, and not a single line of CSS was written specifically for “the card.” Every class is generic and available to build […]
[…] is the right tool for one-dimensional layouts, anything where content flows in a single direction. Aligning elements horizontally or vertically, […]
[…] with proportions in mind from the start. Before writing any CSS, decide how much of its container each element should occupy and express that as a percentage. […]
[…] Mobile First Design: https://datalad.co.uk/why-you-should-design-for-mobile-first/ […]