Responsive Design
Use this skill when the job is to name the failing responsive surface, choose the smallest viable adaptation packet, and leave behind a short strategy + verification brief.
The job is not to dump generic CSS recipes, paste framework snippets, or absorb every neighboring frontend concern.
This skill should:
- classify the responsive failure first,
- choose one primary responsive packet,
- keep viewport vs container ownership explicit,
- separate dense-data and media cases from generic layout advice,
- keep reflow/verification visible,
- route neighboring frontend work honestly.
Read these support docs first:
- references/intake-packets-and-route-outs.md
- references/layout-decision-checklist.md
- references/handoff-boundaries.md
Also read
/Users/newmindsgroup/.codex/skills/visual-style-bible/SKILL.md before making stylistic responsive decisions that should match the house visual system.
When to use this skill
- A team says “this page breaks on mobile” and the real responsive surface is still unclear.
- A dashboard, nav, form, card grid, pricing page, table, or embed needs a responsive strategy before more breakpoints are added.
- You need to decide whether the fix belongs in viewport layout rules, container queries, intrinsic layout, responsive media handling, or verification/reflow follow-up.
- A launch-readiness pass uncovered overflow, wrapping, density, or zoom/reflow failures and someone needs one bounded packet instead of a CSS lecture.
- The request mixes page-level adaptation, component reuse, and dense-data pressure and needs routing before implementation.
When not to use this skill
- The main task is reusable primitive / slot / variant API design or component-family ownership →
ui-component-patterns
- The main task is keyboard/focus behavior, semantics, labels, contrast, reduced motion, or accessibility-heavy remediation →
web-accessibility
- The main task is breakpoint governance, token policy, or cross-product responsive standards →
design-system
- The main task is broad UI critique, polish, heuristic review, or launch-readiness audit across many dimensions →
web-design-guidelines
- The main task is React hydration, rerender churn, or client-boundary performance behavior →
react-best-practices
- The responsive strategy is already clear and the job is just implementation; in that case implement directly instead of re-running the router
Instructions
Step 1: Frame the responsive job before naming CSS
Capture the minimum intake packet first.
responsive_intake:
surface: page-shell | nav | form | table | dashboard | card-grid | media-embed | component-slot | mixed | unknown
workflow_type: bug-fix | refactor-plan | launch-readiness | review-follow-up | design-handoff | unknown
primary_packet: page-layout | component-slot | dense-data | media-behavior | verification-reflow | mixed | unknown
pressure_source: viewport-width | parent-container | content-density | localization-copy | zoom-reflow | mixed | unknown
signal_source: bug-report | screenshot | browser-resize | qa-review | design-review | a11y-review | mixed | unknown
confidence: high | medium | low
Rule: do not start with “add another breakpoint.” First label the failing responsive surface.
Step 2: Choose exactly one primary responsive packet
Use the router in references/intake-packets-and-route-outs.md.
Primary packets:
page-layout
component-slot
dense-data
media-behavior
verification-reflow
Pick the highest-leverage packet for the current decision. List anything else as follow-up, not as equal co-owners.
Step 3: Keep the invariants visible
These rules survive every answer:
- mobile-first defaults are still the safest baseline for feature delivery
- intrinsic layout beats breakpoint sprawl when it solves the problem cleanly
- viewport rules own page-shell changes; container rules own reusable slot adaptation
- breakpoints should reflect content pressure, not device brand names
- dense tables/toolbars are special cases and often need explicit fallback choices
- responsive media needs intentional
srcset / sizes / aspect-ratio thinking, not just width: 100%
- zoom/reflow and long-copy stress are verification requirements, not afterthoughts
Step 4: Build the responsive strategy packet
Return this structure:
# Responsive Strategy Packet
## Scope
- Surface:
- Workflow type:
- Primary packet:
- Confidence: high | medium | low
## Current signal
- Main symptom:
- Pressure source:
- What is already known:
- What still needs direct verification:
## Recommended first slice
1. ...
2. ...
3. ...
## Layout decisions
- Mobile-first baseline:
- Intrinsic layout rules:
- Viewport query layer:
- Container-query usage:
- Dense-data / media fallback:
## Verification plan
- Narrow-width checks:
- Zoom / reflow checks:
- Overflow / wrapping checks:
- Content-density / localization checks:
## Ownership and route-outs
- Primary owner:
- Adjacent skills / teams:
Step 5: Use the packet, not a giant CSS tutorial
Pull the packet from references/intake-packets-and-route-outs.md.
Packet rules:
page-layout → page shell, nav/sidebar shifts, grid columns, spacing density, viewport breakpoints
component-slot → reusable card/panel/module behavior that changes by parent width; container queries or intrinsic component rules
dense-data → tables, toolbars, filter bars, dashboards, and intentional fallback choices such as summary, disclosure, or horizontal scroll
media-behavior → image/video/embed sizing, srcset / sizes, aspect ratio, crop strategy, and art-direction edge cases
verification-reflow → zoom, reflow, overflow, long labels, localization, and screenshot-vs-manual follow-up before release
Step 6: Separate mechanism choice from ownership choice
Use this split in every serious answer:
- Mechanism — intrinsic layout, viewport queries, container queries, responsive media rules, fallback presentation
- Ownership —
responsive-design, ui-component-patterns, web-accessibility, design-system, web-design-guidelines, or react-best-practices
If the request starts from a screenshot, QA note, or “mobile is broken” report, say explicitly that the screenshot is the signal artifact, not the finished responsive strategy.
Step 7: Route adjacent work explicitly
Use these route-outs when the problem crosses boundaries:
| If the real job is... |
Route to... |
| reusable primitive API, variant sprawl, slot ownership, component structure |
ui-component-patterns |
| semantics, keyboard/focus, labels, contrast, motion, or accessibility-heavy remediation |
web-accessibility |
| shared breakpoint tokens, system-wide density rules, cross-product frontend standards |
design-system |
| broad launch-readiness UI critique, hierarchy, polish, or heuristic review |
web-design-guidelines |
| hydration, rerender churn, client-boundary cost, or runtime performance |
react-best-practices |
Output expectations
A strong answer from this skill should:
- identify the primary responsive packet,
- recommend one bounded adaptation strategy,
- name the manual verification still required,
- avoid treating framework helpers as a complete strategy,
- route broader frontend ownership questions outward instead of absorbing them.
Examples
Example 1: dashboard overflow on mobile
Input
Our dashboard filter bar and data table force horizontal scrolling on mobile. Help us fix the responsive behavior.
Output direction
- choose
dense-data
- keep a mobile-first shell but make the table/toolbar fallback intentional
- include zoom/reflow verification and long-label checks
- route accessibility-heavy remediation to
web-accessibility if it becomes the main issue
Example 2: reusable card in many slots
Input
The same card lives in a sidebar, a feed, and a 2-column grid. Should we use container queries or more viewport breakpoints?
Output direction
- choose
component-slot
- explain why parent-container width is the main driver
- recommend container queries or intrinsic layout at the card-shell boundary
- route primitive/API redesign to
ui-component-patterns if the structure itself is wrong
Example 3: pricing page before launch
Input
Review this pricing page before launch. Cards feel cramped on mobile and the hero wraps badly.
Output direction
- keep
responsive-design on the layout-adaptation slice only
- produce one packet for page layout plus dense mobile sections
- route broader hierarchy / CTA / polish review to
web-design-guidelines
- keep accessibility remediation separate unless it becomes primary
Example 4: system-wide breakpoint debate
Input
Our teams all use different breakpoint and spacing rules across products. Is responsive-design the right skill?
Output direction
- explain that shared breakpoint/token governance is broader
design-system work
- keep
responsive-design narrower than cross-product standards
- avoid over-triggering on governance-only requests
Example 5: zoom and reflow failure
Input
This form still breaks at 400% zoom and keyboard users lose context. Should we keep fixing it in responsive-design?
Output direction
- choose
verification-reflow first if layout ownership is still unclear
- include zoom/reflow verification explicitly
- route keyboard/focus remediation to
web-accessibility
- split the work instead of forcing one skill to own everything
Best practices
- Start with the failing responsive surface, not the syntax trick.
- Prefer intrinsic layout before adding another breakpoint.
- Keep viewport and container ownership explicit.
- Treat tables, toolbars, and dense dashboards as packet-worthy special cases.
- Treat screenshots and device-mode checks as inputs, not proof of completion.
- Keep verification honest: zoom, reflow, long copy, and overflow still matter.
- When unsure, route neighboring frontend work explicitly instead of inflating this skill.
References
1---2name: responsive-design3description: Routing-first responsive layout strategy and verification for web interfaces. Use when the main job is classifying whether the failure is page-shell adaptation, reusable component/container behavior, dense-data or toolbar pressure, responsive media, or reflow verification — then turning vague “breaks on mobile” requests into one concrete strategy packet. Route component API design to `ui-component-patterns`, accessibility remediation to `web-accessibility`, system-wide breakpoint/token governance to `design-system`, and broad UI audit work to `web-design-guidelines`.4license: MIT5---67# Responsive Design89Use this skill when the job is to **name the failing responsive surface, choose the smallest viable adaptation packet, and leave behind a short strategy + verification brief**.1011The job is not to dump generic CSS recipes, paste framework snippets, or absorb every neighboring frontend concern.1213This skill should:141. classify the responsive failure first,152. choose one primary responsive packet,163. keep viewport vs container ownership explicit,174. separate dense-data and media cases from generic layout advice,185. keep reflow/verification visible,196. route neighboring frontend work honestly.2021Read these support docs first:22- [references/intake-packets-and-route-outs.md](references/intake-packets-and-route-outs.md)23- [references/layout-decision-checklist.md](references/layout-decision-checklist.md)24- [references/handoff-boundaries.md](references/handoff-boundaries.md)25Also read `/Users/newmindsgroup/.codex/skills/visual-style-bible/SKILL.md` before making stylistic responsive decisions that should match the house visual system.2627## When to use this skill28- A team says “this page breaks on mobile” and the real responsive surface is still unclear.29- A dashboard, nav, form, card grid, pricing page, table, or embed needs a responsive strategy before more breakpoints are added.30- You need to decide whether the fix belongs in viewport layout rules, container queries, intrinsic layout, responsive media handling, or verification/reflow follow-up.31- A launch-readiness pass uncovered overflow, wrapping, density, or zoom/reflow failures and someone needs one bounded packet instead of a CSS lecture.32- The request mixes page-level adaptation, component reuse, and dense-data pressure and needs routing before implementation.3334## When not to use this skill35- **The main task is reusable primitive / slot / variant API design or component-family ownership** → `ui-component-patterns`36- **The main task is keyboard/focus behavior, semantics, labels, contrast, reduced motion, or accessibility-heavy remediation** → `web-accessibility`37- **The main task is breakpoint governance, token policy, or cross-product responsive standards** → `design-system`38- **The main task is broad UI critique, polish, heuristic review, or launch-readiness audit across many dimensions** → `web-design-guidelines`39- **The main task is React hydration, rerender churn, or client-boundary performance behavior** → `react-best-practices`40- **The responsive strategy is already clear and the job is just implementation**; in that case implement directly instead of re-running the router4142## Instructions4344### Step 1: Frame the responsive job before naming CSS45Capture the minimum intake packet first.4647```yaml48responsive_intake:49 surface: page-shell | nav | form | table | dashboard | card-grid | media-embed | component-slot | mixed | unknown50 workflow_type: bug-fix | refactor-plan | launch-readiness | review-follow-up | design-handoff | unknown51 primary_packet: page-layout | component-slot | dense-data | media-behavior | verification-reflow | mixed | unknown52 pressure_source: viewport-width | parent-container | content-density | localization-copy | zoom-reflow | mixed | unknown53 signal_source: bug-report | screenshot | browser-resize | qa-review | design-review | a11y-review | mixed | unknown54 confidence: high | medium | low55```5657Rule: do **not** start with “add another breakpoint.” First label the failing responsive surface.5859### Step 2: Choose exactly one primary responsive packet60Use the router in [references/intake-packets-and-route-outs.md](references/intake-packets-and-route-outs.md).6162Primary packets:631. `page-layout`642. `component-slot`653. `dense-data`664. `media-behavior`675. `verification-reflow`6869Pick the highest-leverage packet for the current decision. List anything else as follow-up, not as equal co-owners.7071### Step 3: Keep the invariants visible72These rules survive every answer:73- mobile-first defaults are still the safest baseline for feature delivery74- intrinsic layout beats breakpoint sprawl when it solves the problem cleanly75- viewport rules own page-shell changes; container rules own reusable slot adaptation76- breakpoints should reflect content pressure, not device brand names77- dense tables/toolbars are special cases and often need explicit fallback choices78- responsive media needs intentional `srcset` / `sizes` / aspect-ratio thinking, not just width: 100%79- zoom/reflow and long-copy stress are verification requirements, not afterthoughts8081### Step 4: Build the responsive strategy packet82Return this structure:8384```markdown85# Responsive Strategy Packet8687## Scope88- Surface:89- Workflow type:90- Primary packet:91- Confidence: high | medium | low9293## Current signal94- Main symptom:95- Pressure source:96- What is already known:97- What still needs direct verification:9899## Recommended first slice1001. ...1012. ...1023. ...103104## Layout decisions105- Mobile-first baseline:106- Intrinsic layout rules:107- Viewport query layer:108- Container-query usage:109- Dense-data / media fallback:110111## Verification plan112- Narrow-width checks:113- Zoom / reflow checks:114- Overflow / wrapping checks:115- Content-density / localization checks:116117## Ownership and route-outs118- Primary owner:119- Adjacent skills / teams:120```121122### Step 5: Use the packet, not a giant CSS tutorial123Pull the packet from [references/intake-packets-and-route-outs.md](references/intake-packets-and-route-outs.md).124125Packet rules:126- `page-layout` → page shell, nav/sidebar shifts, grid columns, spacing density, viewport breakpoints127- `component-slot` → reusable card/panel/module behavior that changes by parent width; container queries or intrinsic component rules128- `dense-data` → tables, toolbars, filter bars, dashboards, and intentional fallback choices such as summary, disclosure, or horizontal scroll129- `media-behavior` → image/video/embed sizing, `srcset` / `sizes`, aspect ratio, crop strategy, and art-direction edge cases130- `verification-reflow` → zoom, reflow, overflow, long labels, localization, and screenshot-vs-manual follow-up before release131132### Step 6: Separate mechanism choice from ownership choice133Use this split in every serious answer:134- **Mechanism** — intrinsic layout, viewport queries, container queries, responsive media rules, fallback presentation135- **Ownership** — `responsive-design`, `ui-component-patterns`, `web-accessibility`, `design-system`, `web-design-guidelines`, or `react-best-practices`136137If the request starts from a screenshot, QA note, or “mobile is broken” report, say explicitly that the screenshot is the **signal artifact**, not the finished responsive strategy.138139### Step 7: Route adjacent work explicitly140Use these route-outs when the problem crosses boundaries:141142| If the real job is... | Route to... |143|---|---|144| reusable primitive API, variant sprawl, slot ownership, component structure | `ui-component-patterns` |145| semantics, keyboard/focus, labels, contrast, motion, or accessibility-heavy remediation | `web-accessibility` |146| shared breakpoint tokens, system-wide density rules, cross-product frontend standards | `design-system` |147| broad launch-readiness UI critique, hierarchy, polish, or heuristic review | `web-design-guidelines` |148| hydration, rerender churn, client-boundary cost, or runtime performance | `react-best-practices` |149150## Output expectations151A strong answer from this skill should:1521. identify the **primary responsive packet**,1532. recommend one bounded adaptation strategy,1543. name the **manual verification still required**,1554. avoid treating framework helpers as a complete strategy,1565. route broader frontend ownership questions outward instead of absorbing them.157158## Examples159160### Example 1: dashboard overflow on mobile161**Input**162> Our dashboard filter bar and data table force horizontal scrolling on mobile. Help us fix the responsive behavior.163164**Output direction**165- choose `dense-data`166- keep a mobile-first shell but make the table/toolbar fallback intentional167- include zoom/reflow verification and long-label checks168- route accessibility-heavy remediation to `web-accessibility` if it becomes the main issue169170### Example 2: reusable card in many slots171**Input**172> The same card lives in a sidebar, a feed, and a 2-column grid. Should we use container queries or more viewport breakpoints?173174**Output direction**175- choose `component-slot`176- explain why parent-container width is the main driver177- recommend container queries or intrinsic layout at the card-shell boundary178- route primitive/API redesign to `ui-component-patterns` if the structure itself is wrong179180### Example 3: pricing page before launch181**Input**182> Review this pricing page before launch. Cards feel cramped on mobile and the hero wraps badly.183184**Output direction**185- keep `responsive-design` on the layout-adaptation slice only186- produce one packet for page layout plus dense mobile sections187- route broader hierarchy / CTA / polish review to `web-design-guidelines`188- keep accessibility remediation separate unless it becomes primary189190### Example 4: system-wide breakpoint debate191**Input**192> Our teams all use different breakpoint and spacing rules across products. Is responsive-design the right skill?193194**Output direction**195- explain that shared breakpoint/token governance is broader `design-system` work196- keep `responsive-design` narrower than cross-product standards197- avoid over-triggering on governance-only requests198199### Example 5: zoom and reflow failure200**Input**201> This form still breaks at 400% zoom and keyboard users lose context. Should we keep fixing it in responsive-design?202203**Output direction**204- choose `verification-reflow` first if layout ownership is still unclear205- include zoom/reflow verification explicitly206- route keyboard/focus remediation to `web-accessibility`207- split the work instead of forcing one skill to own everything208209## Best practices2101. Start with the failing responsive surface, not the syntax trick.2112. Prefer intrinsic layout before adding another breakpoint.2123. Keep viewport and container ownership explicit.2134. Treat tables, toolbars, and dense dashboards as packet-worthy special cases.2145. Treat screenshots and device-mode checks as inputs, not proof of completion.2156. Keep verification honest: zoom, reflow, long copy, and overflow still matter.2167. When unsure, route neighboring frontend work explicitly instead of inflating this skill.217218## References219- [MDN: Responsive design](https://developer.mozilla.org/en-US/docs/Learn_web_development/Core/CSS_layout/Responsive_Design)220- [MDN: Using media queries](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_media_queries/Using_media_queries)221- [MDN: Container queries](https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Containment/Container_queries)222- [MDN: Responsive images](https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images)223- [web.dev: Learn Responsive Design](https://web.dev/learn/design)224- [W3C WAI: Understanding Reflow](https://www.w3.org/WAI/WCAG21/Understanding/reflow.html)