responsive-layout
Skill0 starsChanged 12 days agoMITView on GitHub
Build layouts that adapt to space: intrinsic sizing, container queries, fluid typography/spacing with clamp(), logical properties, and touch targets.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- KyaniteLabs/tastechecktheir own version, first seen Nov 23, 2026
- thewyattbrocato/design-and-copy-skillstheir own version, first seen Oct 17, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- KyaniteLabs/tastecheck★ 12same name
- thewyattbrocato/design-and-copy-skills★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository68 other files it gives its agents.
- skills/web-development/adapters/copilot-instructions.mdCopilot instructions
- accessibility-auditSkill
- agent-handoffSkill
- ai-tool-securitySkill
- api-designSkill
- audit-loggingSkill
- background-jobsSkill
- bulk-reporting-exportSkill
- changelog-generatorSkill
- ci-cdSkill
- codebase-onboardingSkill
- code-reviewSkill
- code-simplificationSkill
- context-engineeringSkill
- context-privacySkill
- data-import-exportSkill
- debuggingSkill
- dependency-auditSkill
- deprecation-and-migrationSkill
- design-tokensSkill
- documentation-and-adrsSkill
- doubt-driven-developmentSkill
- environmental-telemetrySkill
- erp-accountingSkill
- erp-domain-designSkill
- erp-inventorySkill
- erp-procurementSkill
- erp-salesSkill
- feature-flagsSkill
- forms-and-validationSkill
- frontend-stateSkill
- frontend-ui-engineeringSkill
- git-workflowSkill
- identity-access-managementSkill
- incremental-implementationSkill
- java-code-standardsSkill
- java-deliverySkill
- kerangkaSkill
- mcp-builderSkill
- membership-managementSkill
- observabilitySkill
- performance-optimizationSkill
- planning-and-task-breakdownSkill
- product-analyticsSkill
- quarkus-observabilitySkill
- quarkus-persistenceSkill
- quarkus-securitySkill
- quarkus-serviceSkill
- quarkus-testingSkill
- rest-api-contractSkill
- saas-billingSkill
- saas-multitenancySkill
- saas-onboardingSkill
- security-hardeningSkill
- shipping-and-launchSkill
- skill-creatorSkill
- skill-evaluationSkill
- source-driven-developmentSkill
- spec-driven-developmentSkill
- test-driven-developmentSkill
- The first 60 shown.
The file
Files
Responsive Layout
Overview
Responsive stopped meaning "reacts to the viewport" once a component could be placed in a
sidebar, a grid cell and a modal on the same page. A layout that only knows the window size
cannot be right in all three, and the usual repair — a variant prop per context — is how
a component library acquires props nobody can remember.
When to use
- A component appears in more than one container width
- A layout breaks at some width, at 200% zoom, or with long real content
- Adding or arguing about breakpoints
- Supporting right-to-left, or a language whose strings are much longer
- Mobile bugs involving viewport height, safe areas, or hit targets
Hand off when
| Need | Skill |
| The scale values themselves, and theming | design-tokens |
| Splitting or composing the component | frontend-ui-engineering |
| Verifying a built page against WCAG | accessibility-audit |
Process
- Let content size itself before writing a query.
minmax(),auto-fit,flex-wrapandmin()/max()handle most layouts with no breakpoint at all. A layout with no query cannot break at a width nobody tested. - Query the container, not the viewport, for anything reusable. A card decides its own layout from the space it was given. Viewport queries belong to the page shell — the thing that actually knows about the window.
- Make type and space fluid with
clamp(), bounded at both ends. Steps between two fixed sizes leave every width in between slightly wrong. - Use logical properties throughout —
margin-inline-start,padding-block,inset-inline— so a right-to-left locale is adirattribute rather than a stylesheet. - Use breakpoints last, and only for genuine layout changes, not for fitting numbers. Each one is a width someone has to test forever.
- Size the viewport in
dvh/svh, notvh, and respect safe areas.100vhis wrong on every mobile browser with a retracting toolbar. - Give interactive things a 24×24 CSS px minimum target (44×44 for anything primary on touch), padding the target rather than growing the glyph.
- Test against content, not only widths. The longest real string, the empty state, a 2.5× word-length translation, and 200% zoom break more layouts than any device width.
- Check internal control geometry. Icon size and target size are independent. Bound form width and wrap action groups with gaps; verify broad host CSS does not stretch pagination targets or make disabled controls appear active.
Red flags
- A
variantorsizeprop that exists only because the component cannot read its container - A media query inside a reusable component
100vhon a mobile layout; content cut off behind a browser toolbarmargin-left/padding-rightin a codebase that must support RTL- Font sizes that step at breakpoints instead of scaling
- A breakpoint added to fix one number's overflow
- Fixed heights on anything containing text
- Tap targets smaller than 24px, or spaced closer than their own size
clamp()with no lower bound, so zooming stops scaling the text
Verification
- Reusable components respond to container width, not window width
- Layout holds at 320px, at 2560px, and at every width between — resize continuously
- Layout holds at 200% browser zoom and at 400% (WCAG 1.4.10 reflow)
- No horizontal scroll at 320px
- Longest real content and the empty state both render correctly
dir="rtl"on the root mirrors the layout with no stylesheet change- Mobile: full-height surfaces are not clipped by the browser toolbar
- Interactive targets are at least 24×24px with adequate spacing
References
references/intrinsic-and-container.md— auto-fit/minmax, container queries, subgrid,:has()references/fluid-type-and-space.md— the clamp() formula, scales, and the zoom trapreferences/viewport-touch-and-rtl.md— dvh/svh, safe areas, target sizing, logical propertiesreferences/adaptive-layout-archetypes.md— window size classes, multi-pane patterns, and shell boundariesreferences/modern-css-and-rendering.md— native nesting, cascade layers, subgrid, and Core Web Vitals
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

