OneLinersCommand workbench
AI
Back to skills
SKILL.md

Responsive UI reviewer

An evidence-first workflow to verify hierarchy and interaction behavior across supported viewport ranges.

Revision
2
Verified
2026-10-20
Save or explore
Save to collectionCreate a collection in the sidebar first.

Compatibility and paths

Codexskills/responsive-ui-review/SKILL.md
Claude Code.claude/skills/responsive-ui-review/SKILL.md
VS Code.github/skills/responsive-ui-review/SKILL.md

Trust and provenance

Curated record reviewed 2026-10-20. Results still depend on the supplied context and target environment.

Generated assetReady to copy or download
---
name: responsive-ui-review
description: Reviews intrinsic layout, long content and preserved interaction state across measured viewport widths. Use when a card grid fits a screenshot but overflows or resets real content; fix sizing at its source rather than hiding the page overflow.
license: CC-BY-4.0
compatibility: Two full original HTML files run in a browser without packages/assets. The input is an owned throwaway draft. Measure actual CSS client widths, supported zoom and input methods; small viewport alone is not complete mobile/WCAG coverage.
metadata:
  author: oneliners
  version: "2.0.0"
---

# Responsive UI reviewer

## Choose the task and stress content first
Record route, browser, actual CSS viewport, supported zoom/text size and pointer/keyboard flow. Include long unbroken identifiers, localization, validation/loading/empty states and a draft that must survive resizing. Check page versus deliberately local scrolling, clipped controls and focus order. Preserve existing data and never reload a real user's unsaved input just to reset a layout.

## Complete original grid regression
The same long identifier, full command and input are included in both files; nothing is fetched from an external resource. Save the complete blocks as responsive-before.html and responsive-after.html. Before intentionally demonstrates a failure, not recommended CSS.

```html
<!doctype html>
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Owned grid — negative control</title><style>:root{color-scheme:dark;--surface:#151a21;--on-surface:#f0f4f8;--muted:#aab6c5;--action:#89b4fa;--on-action:#111820;--focus:#ffd75f;--danger-surface:#4f2329;--on-danger:#ffdadd;--space-control:12px;--radius:8px}
*{box-sizing:border-box}body{margin:0;background:var(--surface);color:var(--on-surface);font:1rem/1.5 system-ui,sans-serif}main{max-inline-size:64rem;margin-inline:auto;padding:24px}h1{font-size:1.75rem;line-height:1.2}button,input{font:inherit}button{min-block-size:44px;min-inline-size:44px;padding:var(--space-control);border:1px solid var(--action);border-radius:var(--radius);background:var(--action);color:var(--on-action);cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible,pre:focus-visible{outline:3px solid var(--focus);outline-offset:3px}a{color:var(--action)}.muted{color:var(--muted)}input{max-inline-size:100%;padding:12px;border:1px solid var(--muted);background:var(--surface);color:var(--on-surface)}p,li{overflow-wrap:anywhere}
@media(forced-colors:active){:root{--surface:Canvas;--on-surface:CanvasText;--muted:CanvasText;--action:ButtonFace;--on-action:ButtonText;--focus:Highlight;--danger-surface:Canvas;--on-danger:CanvasText}button{border-color:ButtonText}a{color:LinkText}}
.cards{display:grid;grid-template-columns:repeat(2,22rem);gap:16px;margin-block-start:24px}article{padding:16px;border:1px solid var(--muted)}.identifier{white-space:nowrap}pre{white-space:pre}</style></head>
<body><main><h1>Owned card-layout review</h1><p>The draft note must survive viewport resizing. This page has no storage or network.</p><label for="note">Draft note</label><input id="note" value="Keep this draft"><div class="cards"><article><h2>Project identity</h2><p class="identifier">project_longunbrokenidentifierlongunbrokenidentifierlongunbrokenidentifierlongunbrokenidentifierlongunbrokenidentifierlongunbrokenidentifierlongunbrokenidentifierlongunbrokenidentifier</p><button type="button">Review project</button></article><article><h2>Exact command text</h2><p>The indented code may scroll locally; surrounding prose must fit.</p><pre tabindex="0" role="region" aria-label="Example command">owned-review --project project_longunbrokenidentifierlongunbrokenidentifierlongunbrokenidentifierlongunbrokenidentifierlongunbrokenidentifierlongunbrokenidentifierlongunbrokenidentifierlongunbrokenidentifier --mode read-only</pre><button type="button">Review command</button></article></div></main></body></html>
```


```html
<!doctype html>
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Owned grid — intrinsic sizing</title><style>:root{color-scheme:dark;--surface:#151a21;--on-surface:#f0f4f8;--muted:#aab6c5;--action:#89b4fa;--on-action:#111820;--focus:#ffd75f;--danger-surface:#4f2329;--on-danger:#ffdadd;--space-control:12px;--radius:8px}
*{box-sizing:border-box}body{margin:0;background:var(--surface);color:var(--on-surface);font:1rem/1.5 system-ui,sans-serif}main{max-inline-size:64rem;margin-inline:auto;padding:24px}h1{font-size:1.75rem;line-height:1.2}button,input{font:inherit}button{min-block-size:44px;min-inline-size:44px;padding:var(--space-control);border:1px solid var(--action);border-radius:var(--radius);background:var(--action);color:var(--on-action);cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible,pre:focus-visible{outline:3px solid var(--focus);outline-offset:3px}a{color:var(--action)}.muted{color:var(--muted)}input{max-inline-size:100%;padding:12px;border:1px solid var(--muted);background:var(--surface);color:var(--on-surface)}p,li{overflow-wrap:anywhere}
@media(forced-colors:active){:root{--surface:Canvas;--on-surface:CanvasText;--muted:CanvasText;--action:ButtonFace;--on-action:ButtonText;--focus:Highlight;--danger-surface:Canvas;--on-danger:CanvasText}button{border-color:ButtonText}a{color:LinkText}}
.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,22rem),1fr));gap:16px;margin-block-start:24px}article{min-inline-size:0;padding:16px;border:1px solid var(--muted)}.identifier{overflow-wrap:anywhere}pre{max-inline-size:100%;overflow-x:auto;white-space:pre;padding:12px;border:1px solid var(--muted)}</style></head>
<body><main><h1>Owned card-layout review</h1><p>The draft note must survive viewport resizing. This page has no storage or network.</p><label for="note">Draft note</label><input id="note" value="Keep this draft"><div class="cards"><article><h2>Project identity</h2><p class="identifier">project_longunbrokenidentifierlongunbrokenidentifierlongunbrokenidentifierlongunbrokenidentifierlongunbrokenidentifierlongunbrokenidentifierlongunbrokenidentifierlongunbrokenidentifier</p><button type="button">Review project</button></article><article><h2>Exact command text</h2><p>The indented code may scroll locally; surrounding prose must fit.</p><pre tabindex="0" role="region" aria-label="Example command">owned-review --project project_longunbrokenidentifierlongunbrokenidentifierlongunbrokenidentifierlongunbrokenidentifierlongunbrokenidentifierlongunbrokenidentifierlongunbrokenidentifierlongunbrokenidentifier --mode read-only</pre><button type="button">Review command</button></article></div></main></body></html>
```

## Measured reproduction and state check
At a narrow viewport, compare document.documentElement.clientWidth with scrollWidth. Inspect the grid/item/pre widths rather than applying overflow:hidden to body. In the repaired file, enter Owned draft retained during resize in Draft note; widen and narrow the same page without navigation/reload, then read the exact input and focused element again. The code content must remain complete/copyable in its own scroll region, and DOM focus order must match reading order.

## Worked result and interpretation
The supplied negative control combines two fixed 22rem tracks, an unbroken project identifier and an unconstrained preformatted line. In the owned small-view check, clientWidth 320 and document.scrollWidth 2379 confirm page-level overflow. A mobile screenshot that simply clips the right side or a body overflow:hidden rule would hide the problem, not fix access to the content.

The repaired example uses a minimum that cannot exceed available width, min-inline-size:0 on the grid item, wrapping for the long prose identifier, and overflow-x:auto on the code block only. At measured 320 CSS px, document.scrollWidth is 320. The command's own scrollWidth 1995 exceeds its 237 px client width and remains locally scrollable without widening the whole page. These exact font-dependent values are observations from one owned browser run, not universal expected pixel counts.

After entering Owned draft retained during resize, expanding the same live page to measured 1440 CSS px keeps the exact text and shows both cards on one row; narrowing again preserves the input and focus. No reload, hidden clipping or DOM/visual reordering was used to make the layout pass. The native Review buttons are focus-order targets in this layout exercise, not implemented project-review operations.

This is a bounded reflow/state-retention check, not a full mobile-device, 400% zoom or WCAG certification. Verify the actual supported zoom/text-spacing/input/device matrix and all control functionality separately. Meaningful indented code can need local two-dimensional scrolling; that exception does not excuse long ordinary prose or adjacent controls overflowing. Return actual viewport/client widths, offending element/track, state/focus behavior, before/after measurements and remaining coverage. No production stylesheet or user draft was changed.

## Guidance and acceptance
[W3C Reflow guidance](https://www.w3.org/WAI/WCAG22/Understanding/reflow.html) distinguishes ordinary prose from content whose meaning needs two-dimensional layout. Measure the viewport after browser scaling/scrollbars rather than assuming requested screenshot dimensions equal CSS space. Return a short defect ledger with exact state/width, cause, minimal sizing repair, functional retest and untested conditions. Do not restyle the whole app, truncate essential strings, reorder interactive cards visually or add a nested page-wide scrolling rail to mask a local problem.

Real example

Input

Review the full before/after card-layout HTML in SKILL.md using the included long identifier, code line and Draft note. Measure page/local overflow at narrow widths and preserve a real entered draft/focus while resizing the same page. Do not hide overflow or reload away the state.

Expected result

The supplied negative control combines two fixed 22rem tracks, an unbroken project identifier and an unconstrained preformatted line. In the owned small-view check, clientWidth 320 and document.scrollWidth 2379 confirm page-level overflow. A mobile screenshot that simply clips the right side or a body overflow:hidden rule would hide the problem, not fix access to the content.

The repaired example uses a minimum that cannot exceed available width, min-inline-size:0 on the grid item, wrapping for the long prose identifier, and overflow-x:auto on the code block only. At measured 320 CSS px, document.scrollWidth is 320. The command's own scrollWidth 1995 exceeds its 237 px client width and remains locally scrollable without widening the whole page. These exact font-dependent values are observations from one owned browser run, not universal expected pixel counts.

After entering Owned draft retained during resize, expanding the same live page to measured 1440 CSS px keeps the exact text and shows both cards on one row; narrowing again preserves the input and focus. No reload, hidden clipping or DOM/visual reordering was used to make the layout pass. The native Review buttons are focus-order targets in this layout exercise, not implemented project-review operations.

This is a bounded reflow/state-retention check, not a full mobile-device, 400% zoom or WCAG certification. Verify the actual supported zoom/text-spacing/input/device matrix and all control functionality separately. Meaningful indented code can need local two-dimensional scrolling; that exception does not excuse long ordinary prose or adjacent controls overflowing. Return actual viewport/client widths, offending element/track, state/focus behavior, before/after measurements and remaining coverage. No production stylesheet or user draft was changed.

Source evidence

Agent Skills specificationofficialMDN responsive designofficialW3C WCAG2.2 — reflow and local exceptionsofficial