Design
31 Oct 2026
7 min read

Mobile-First Design: Fluid Layouts with Sparse Breakpoints

How SpaceZero stays mobile-first: fluid by default, with responsive prefixes allowed and used sparingly only where a single layout cannot work.

Mobile-First Design: Fluid by Default

SpaceZero is mobile-first: every component is designed for the smallest screen first.

Responsive Prefixes Are Allowed

sm:, md:, lg:, xl:, 2xl: are allowed in all files. They are used sparingly — only where a single fluid layout genuinely cannot work (e.g. a modal's max width, the profile page's two-column grid, the footer's row layout).

tsx

// Profile page: single column on mobile, two columns from md up

<div className="grid grid-cols-1 md:grid-cols-2 gap-3">

 

// Footer: stacked on mobile, row from md up

<div className="flex flex-col md:flex-row items-center gap-3 md:justify-between">

The Default Is Fluid

Most layouts need no breakpoints at all:

tsx

// Fluid: full width, constrained, centered

<div className="w-full max-w-lg mx-auto px-5">

Touch Targets First

All interactive elements meet the 44×44px minimum using the py-3 scaling token:

tsx

// Button

py-3

 

// Input

py-3

 

// Select trigger

py-3

Hero Text

One title size, no fluid clamp():

tsx

<HeroTitle>Any Title</HeroTitle> // text-5xl font-hero font-semibold

ModalDialog is fluid with one breakpoint for the desktop cap:

tsx

w-full max-w-full rounded-5 border border-border bg-layer p-5 md:max-w-lg

  • Mobile: full width
  • Desktop (md and up): constrained to 512px

Testing Checklist

  • [ ] 320px viewport (iPhone SE)
  • [ ] No horizontal scroll ever
  • [ ] Forms don't zoom on iOS (16px inherited font)
  • [ ] Modals open/close cleanly
  • [ ] All tap targets ≥ 44px

Benefits

  1. Simpler CSS: One fluid base layout, breakpoints only where needed
  2. Fewer Bugs: No breakpoint edge cases in the common path
  3. Better UX: Consistent experience everywhere
  4. Easier Maintenance: One layout to reason about