#14 Responsive design: mobile + desktop
Context: hu13's Tokyo Night style was built desktop-first. Owner will review the live site on mobile + desktop; it must be fully usable at 360px width. Tasks:
meta viewportalready in layout? verify, add if missing.- static/style.css responsive pass (stays <15KB, sharp corners, Tokyo Night):
- fluid layout:
.wrapmax-width + side padding, no fixed pixel widths, no horizontal page scroll at 360px. - nav wraps (flex-wrap) so 8 tabs don't overflow on phones.
- file/commit tables: wrap in horizontal-scroll container (table itself never breaks layout;
pregetsoverflow-x: auto). - header stacks (repo name + clone cmd + meta) on narrow; clone cmd + sha wrap/break-all safely.
- touch targets >= 40px for nav links + form inputs + buttons; form fields full-width on mobile.
- breakpoints: base = mobile single-column; >=768px two-col niceties (tree+readme side by side ONLY if it fits); >=1100px max-width container.
- fluid layout:
- Keep zero JS, file:// compatible, reader-mode friendly.
- Tests: assert viewport meta in layout output; assert media queries present in CSS; assert
pre/tablescroll wrappers in file + commit pages (string asserts on generated HTML from fixture build); CSS budget assert stays. Success rubric:
-
Fixture build HTML contains viewport meta; CSS contains >=2 media queries; no
width: <fixed>pxon layout containers (grep). - 360px reasoning check: nav wraps, tables scroll in containers, forms full-width (supervisor + owner eyeball on live site).
-
fmt+clippy+test green, CSS <15KB, still zero JS.
Swarm: Owl, well-specified. Branch
m6/responsive.
Uunknown ·
Merged PR 350cc5b1 (m6/responsive): 113 tests, CSS 4577B, 3 breakpoints, viewport meta, fluid wrap + scroll containers + 40px targets, zero JS. CI pass. Deploying live now. Rubric verified.