016
LVL 01 — WAVE DEFENDER SESSION 016 DAY 16

BREAKS ON MOBILE

🎫 PIXELCRAFT-006
🎨 Design | 🔵 Easy | Priority: 🟡 Medium

PixelCraft only works on desktop. On mobile screens (<768px), the three-panel layout is crammed and unusable. Implement responsive design: on small screens, show a simplified layout with the canvas taking full width.
CONCEPTS.UNLOCKED
📱
Responsive Design
Layouts that adapt to screen size. One codebase, every device. The web is accessed on screens from 320px phones to 2560px monitors — your CSS must handle all of them.
@
Media Queries
@media (max-width: 768px) { ... } — CSS rules that only apply when a condition is met. The condition is usually screen width, but can also be orientation, resolution, or user preferences.
📐
Mobile-First vs Desktop-First
Mobile-first: write base CSS for mobile, add complexity with min-width queries. Desktop-first: write for desktop, simplify with max-width queries. Mobile-first is the modern standard.
🔍
Viewport Meta Tag
<meta name="viewport" content="width=device-width, initial-scale=1.0"> — tells mobile browsers to use the device's actual width instead of pretending to be a desktop screen.
👆
Touch Targets
Minimum 44×44px for mobile buttons. Fingers are imprecise — a 20px button that works with a mouse cursor is impossible to tap on a phone.
📊
Common Breakpoints
480px (mobile), 768px (tablet), 1024px (laptop), 1440px (desktop). These aren't magic numbers — they're where common layouts tend to break.
HANDS-ON.TASKS
01
Test with DevTools Device Toolbar

Open DevTools → Toggle Device Toolbar (Ctrl+Shift+M) → try iPhone, iPad, various widths.

See the three-panel layout crammed on mobile — it's unusable. The toolbar is squished, canvas is tiny, settings panel overflows.

02
Write Responsive CSS
@media (max-width: 768px) { .app-container { flex-direction: column; } .toolbar { flex-direction: row; width: 100%; height: auto; overflow-x: auto; } .settings-panel { width: 100%; max-height: 40vh; overflow-y: auto; } .tool-btn { min-width: 44px; min-height: 44px; } }
On mobile: the vertical sidebar becomes a horizontal toolbar. The settings panel becomes a scrollable bottom panel. Buttons meet the 44px touch target minimum.
03
Test at Multiple Widths

Test at each breakpoint and verify the layout adapts:

WidthDeviceExpected Layout
320pxSmall phoneSingle column, horizontal toolbar
480pxLarge phoneSingle column, larger touch targets
768pxTabletTransition point — layout switches
1024pxLaptopFull three-panel layout
04
Collapsible Settings on Mobile

Add a collapsible settings panel: hidden by default on mobile, toggle button to show.

This improves mobile UX by giving the canvas maximum screen space by default.

05
Adjust Font Sizes for Readability

Small screens need slightly larger base font sizes for readability. Ensure labels, values, and headings are readable without zooming.

06
Close the Ticket
git switch -c design/PIXELCRAFT-006-responsive # ... implement responsive → test on multiple sizes ... git add src/styles/ git commit -m "Implement responsive layout for mobile (PIXELCRAFT-006)" git push origin design/PIXELCRAFT-006-responsive # PR → Review → Merge → Close ticket ✅
CS.DEEP-DIVE

Adaptive systems respond to their environment.

Responsive web design adapts to screen size. But the same principle applies widely across engineering and nature.

// Adaptive systems everywhere:

Responsive CSS   → adapts to screen size
Cloud auto-scale → adds servers when
                   traffic spikes
Netflix ABR      → adjusts video quality
                   based on connection speed
Biology          → organisms adapt to
                   environment via evolution

// Building systems that gracefully handle
// varying conditions — rather than failing
// when conditions change — is a core
// engineering principle.
"Responsive Audit"
[A] Open 5 popular websites on DevTools Device Toolbar at 320px, 768px, and 1440px. Screenshot how their layouts change at each breakpoint.
[B] Add a second breakpoint at 480px with even simpler styling: hide button labels, show only icons, stack everything vertically.
[C] Open PixelCraft on your actual phone. Test every button and slider with your thumb. Fix anything that's hard to tap.
REF.MATERIAL
ARTICLE
Mozilla Developer Network
The complete guide to responsive design: media queries, fluid grids, flexible images, and mobile-first approach.
RESPONSIVEMDNESSENTIAL
VIDEO
Kevin Powell
Practical walkthrough from zero to responsive: media queries, relative units, fluid typography, and real-world layout patterns.
RESPONSIVEPRACTICAL
VIDEO
Fireship
The fastest possible overview of responsive design. Watch for the mental model, then dive deeper with Kevin Powell.
RESPONSIVEQUICK
TOOL
Responsively
Open-source browser that shows your page on multiple device sizes simultaneously. Changes on one reflect on all.
TESTINGMULTI-DEVICE
ARTICLE
Google
Google's guide to responsive fundamentals: viewport, media queries, breakpoints, and touch targets.
RESPONSIVEGOOGLE
// LEAVE EXCITED BECAUSE
PixelCraft works on phones! Open it on your actual phone. The layout adapts. You solved a problem that affects every website used by billions of people.