
Mobile-First CSS: Default, With Exceptions
Mobile-first remains the right default for most sites, but desktop-first and hybrid are correct calls in specific cases. A decision guide and the pattern in practice.
TL;DR: Mobile-first CSS is still the right default for most sites in 2026 — global traffic remains majority mobile (about 58% in StatCounter's 2025 worldwide figures), the Web Almanac 2022 found min-width media queries on 79% of pages, second only to max-width at 83%, and progressive enhancement keeps the smallest viewport coherent. But it is a default, not an ideology. Desktop-first is correct when the product is desktop-only by design or when mobile is a small enough share of sessions (below about five percent, this article's rule of thumb rather than an industry threshold) that it becomes a graceful-degradation target. The honest answer for most teams is hybrid: design each feature from the viewport that is its natural home.
Why mobile-first became default
Three things made mobile-first the default of the 2015-2020 era and most of them are still true.
The first is traffic. StatCounter's global device share for 2025 sits at roughly 58% mobile, 40% desktop, and 2% tablet (annual figures, as of Nov 2026). The split varies sharply by region — South Korea runs more desktop-heavy than the global average, and Germany and the United States had desktop above 50% in the same 2025 data, while India and Africa as a region stay above 70% mobile — but the global majority is still mobile.
The second is constraint. Mobile imposes a narrow viewport, a slower network, and a weaker CPU. Designing for those constraints first forces essentialism: a feature that does not survive on, for example, a 360 CSS px viewport with 30 Mbps cellular and a midrange Android CPU is probably a feature that was never essential to begin with. Designing for desktop first usually inverts the order — features land at desktop scale and then have to be "made to work" on mobile, which produces compromised mobile experiences and bloated CSS.
The third is the progressive enhancement model itself. The base CSS targets the smallest viable layout. Each @media (min-width: ...) layer adds capabilities at larger sizes without removing anything from the base. The cognitive model is simple — small first, then more — and the resulting cascade has no negative max-width queries hiding behind larger rules.
The min-width pattern in practice
The pattern is direct. Base styles cover the smallest viewport. Each layer wraps additional rules in @media (min-width: ...) queries.
/* Base: mobile (360 CSS px and up) */
.layout {
display: flex;
flex-direction: column;
gap: 1rem;
}
.nav-list {
display: none; /* hamburger toggles visibility */
}
/* Tablet: 48em and up */
@media (width >= 48em) {
.layout {
flex-direction: row;
gap: 2rem;
}
.nav-list {
display: flex; /* nav becomes visible */
}
}
/* Desktop: 64em and up */
@media (width >= 64em) {
.layout {
max-width: 80rem;
margin-inline: auto;
}
}Two details earn their keep. Range syntax (width >= 48em) is cleaner than (min-width: 48em) and reached Baseline in 2023 — the two forms are equivalent conditions under Media Queries Level 4, and the new form reads more naturally in modern code. Using em rather than px in the breakpoint condition respects the user's font scaling preference — a user who sets their browser default to 20px gets a proportionally larger breakpoint set, which keeps content readable. Pixel breakpoints ignore that preference, which can work against users who enlarge their default font size.
The cascade rule is straightforward: each layer only adds. If you find yourself writing display: none inside a larger breakpoint to undo something the base did, the base is wrong and you should restructure.
When desktop-first is correct
Mobile-first as the default does not mean mobile-first is always right. Three categories of product are genuinely desktop-first by design.
The first is professional software where the desktop UI is the product. Integrated development environments, video and audio editors, computer-aided design tools, and complex admin dashboards have desktop-class inputs (multi-monitor layouts, keyboard shortcuts, mouse precision) as core requirements. A mobile version may exist for limited tasks — code review on a phone, approving a deploy, checking a metric — but the design's center of gravity is the desktop window.
The second is products where measured traffic confirms mobile is below about five percent of sessions (a rule of thumb, not an industry threshold) and the cost of treating mobile as first-class exceeds the value it returns. Internal tools, B2B applications targeting office workers, and specialist research platforms often fall into this category. In these cases mobile can be a graceful-degradation target — readable, functional, but not the primary design surface.
The third is legacy sites where a mobile-first refactor would cost more than the mobile traffic share can repay. A 15-year-old enterprise application with thousands of templates and a desktop user base served by the existing layout does not benefit from a ground-up mobile-first rewrite. Progressive improvement (fixing the worst mobile pages, then the next worst) earns more than a wholesale model change.
Desktop-first is the mirror image of mobile-first. Base CSS targets the desktop layout, and @media (max-width: ...) queries layer adaptations for narrower viewports.
/* Base: desktop */
.layout {
display: grid;
grid-template-columns: 240px 1fr;
gap: 2rem;
max-width: 80rem;
margin-inline: auto;
}
/* Tablet and below: collapse the sidebar */
@media (width < 64em) {
.layout {
grid-template-columns: 1fr;
gap: 1rem;
}
}The honest tell that you should be desktop-first is that the desktop layout described as the base reads naturally and the mobile layer reads as a sensible adaptation. If the mobile layer feels like a stack of negations ("remove this", "hide that", "shrink that"), the model is wrong and you should flip it.
Hybrid: feature-first instead of device-first
Most real projects are neither purely mobile-first nor purely desktop-first. They are a mix because individual features have different natural viewports.
Some features are obviously mobile-first. Marketing pages, blog content, navigation, simple forms, profile screens — these benefit from the small-first cascade and become a strict superset of features at larger sizes. Other features are obviously desktop-first. Wide data tables, complex multi-column dashboards, side-by-side diff views, and any UI built around dragging across a large canvas — these have a natural home at 1280 CSS px and adapt downward.
The hybrid approach picks per feature. The shell of the application — header, navigation, footer — works well mobile-first because it has to work everywhere. Individual feature components within the shell can use whichever direction feels natural for that feature. A data table component can be authored desktop-first and adapt to mobile through one of the documented responsive-data-table patterns, while a side panel beside it stays mobile-first.
web.dev's responsive design basics guide recommends picking major breakpoints by starting small: design the content to fit on a small screen size first, then expand the screen until a breakpoint becomes necessary. Treating mobile-first as a default rather than a doctrine is this article's framing, and it is also the right framing for design system documentation. Write the choice down so future contributors do not relitigate it on every PR.
Anti-patterns either way
A few mistakes can occur regardless of which model the team chose.
The first is writing mobile-first CSS but visually verifying only at desktop width. The base styles get checked against the desktop view in DevTools, and the mobile layer gets shipped untested. The fix is to make the small viewport the primary review surface — set DevTools to a 360 CSS px width by default during development.
The second is desktop-first CSS that "somehow works" on mobile because of fluid units. Without explicit narrow-viewport rules, the layout limps along on percentage widths and shrinks proportionally, which usually produces overflow at the smallest sizes, tap targets below the 44 by 44 CSS px target of WCAG 2.5.5 (Level AAA) and sometimes below the 24 by 24 CSS px minimum of WCAG 2.5.8 (Level AA), and text that becomes unreadable. Both criteria have exceptions. Under 2.5.8, an undersized target still passes when a 24 CSS px diameter circle centered on its bounding box does not intersect another target or the circle of another undersized target. Both criteria also exempt a target whose function is also available through another link or control on the same page that meets the same criterion, a target in a sentence (2.5.8 adds targets whose size is constrained by the line-height of non-target text, and 2.5.5 adds targets in a block of text), a target whose size the user agent determines and the author does not modify, and a target whose particular presentation is essential to the information being conveyed (2.5.8 adds presentations that are legally required). Fluid units are necessary but not sufficient.
The third is the separate-mobile-site pattern — m.example.com or /mobile/. This pattern was a legitimate engineering choice in 2010 when mobile browsers were genuinely limited. In 2026 it doubles the maintenance burden and adds search configuration work. Google Search Central documents separate URLs (m-dot) as one of its mobile site configurations, but it recommends additional best practices for them (for example, the same error page status on both versions and an equivalent mobile version for each desktop page that serves different content) and recommends Responsive Web Design as the easiest design pattern to implement and maintain. For a site that runs one, consolidating into a single responsive site removes that double burden.
The fourth is treating the choice as ideological. Mobile-first is a default that earns its keep on most public sites. Desktop-first is correct on a smaller set of products. Hybrid is the honest answer for many teams. None of the three deserve a manifesto.
Phase 1 deliverables and acceptance criteria
The decision and the rollout are both straightforward when you treat them as engineering work rather than design philosophy.
- Measure your traffic split by sessions, not pageviews — pageviews skew toward whichever device class browses more pages per visit.
- As a rule of thumb (these cutoffs are this article's suggestion, not an industry standard), pick mobile-first if mobile is 30% of sessions or more, desktop-first if the product is desktop-only by design or mobile is below about 5%, and hybrid in between. Document the choice in your design system as a default with named exceptions.
- If you are mobile-first, set your DevTools default viewport to 360 CSS px so the smallest viewport is the one you verify against by default.
- If you are desktop-first, write explicit narrow-viewport rules rather than relying on fluid units alone. Verify tap targets are at least 44 CSS px and text reflows at 320 CSS px without horizontal scrolling.
- Retire any
m.example.comseparate-mobile-site if one exists. Consolidating into one responsive site removes the second codebase you would otherwise keep maintaining.
Mobile-first is still the default in 2026. The work is in knowing when your project is one of the exceptions and writing the choice down so the team does not rediscover it on every new project.