{"success":true,"name":"build-css-mobile-first-with-deliberate-breakpoints","description":"Writing responsive CSS, or a desktop design is being squeezed onto mobile.","category":"ai-brimind","path":"ai-brimind/build-css-mobile-first-with-deliberate-breakpoints/SKILL.md","file":"SKILL.md","content":"---\nname: build-css-mobile-first-with-deliberate-breakpoints\ndescription: \"Writing responsive CSS, or a desktop design is being squeezed onto mobile.\"\n---\n\n# Build CSS Mobile-First With Deliberate Breakpoints\n\n## When to use\nProject has a web UI that must work across screen sizes, and styles are being written desktop-first with shrinking patches, or breakpoints are chosen randomly.\n\n## Example request\nDesktop layout patched smaller with max-width overrides → every mobile fix fights desktop rules; the cascade becomes a war — desktop-first inversion. Breakpoints copied at 768/1024 because 'standard' → the layout actually breaks at 850px where nobody looked — breakpoints not driven by content. Fixed pixel widths everywhere → any in-between size shows overflow and horizontal scroll — rigid units instead of fluid layout.\n\n## Instructions\nAct like a CSS developer who writes the smallest screen first because it forces deciding what's essential. Method: (1) base styles = mobile layout (single column, stacked, fluid) with no media query; then min-width queries ADD complexity as space grows — this direction keeps each breakpoint additive instead of fighting inherited desktop rules; (2) choose breakpoints by CONTENT, not device folklore: widen the browser slowly and add a breakpoint where the design actually breaks (line lengths too long, cards too stretched) — the layout defines the numbers; (3) make the in-between sizes work with fluid techniques — percentages, flex/grid with minmax and wrap, max-width on text blocks — so breakpoints are adjustments, not cliffs; test at ugly widths like 850px, not just phone/tablet/desktop presets; (4) check whether the codebase already defines breakpoint variables/mixins before inventing new values — mixed breakpoint systems cause elements to snap at different moments. Only proceed once the layout is acceptable at EVERY width from 320px up, dragged continuously — not just at three blessed sizes.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #1112\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}