Layouts that survive resizing
Point Claude at a screen and it fixes grouping, alignment and order, then tests it resized, translated and mirrored.
See it work
You give it
Use better-layout. This is the product card and sticky buy bar from our Jaipur block-print store. It breaks on small phones, and in January we add an Arabic version for buyers in Dubai. What's wrong and what should it be?
CSS:
.card{display:grid;grid-template-columns:120px 1fr}
.info{padding-left:20px;text-align:left}
.title{height:44px;overflow:hidden}
.buy{position:fixed;bottom:0;width:100vw}
.buy button{width:96px}
HTML:
<div class="card"><img src="kurta.jpg"><div class="info"><p>₹1,850</p><p class="title">Indigo dabu cotton kurta, hand-printed in Bagru</p></div></div>
<div class="buy"><button>Add to bag</button><a>Size guide</a></div>
You get back
Plan for growth and clipping
Severity · Location · Before · After · Why
HIGH · CSS line 3, .title · height: 44px; overflow: hidden · No fixed height. The title takes the lines it needs · This is your small-phone break. At 320px wide, with the card spanning the screen, the text column is about 160px after the 120px photo and 20px padding. At the browser's default 16px that's roughly 20 characters a line, so the 47-character title runs to 3 lines and 44px shows 2. The last words disappear, with no sign they were there and no way to read the full name
HIGH · CSS line 1 and HTML line 1, the photo · No width on img · .card img { width: 100%; height: auto; } · A photo keeps its natural width inside a fixed 120px column. Unless a global rule you didn't paste caps images, a kurta.jpg wider than 120px spills into the text column and the price and title paint over it
MEDIUM · CSS line 5, .buy button · width: 96px · padding-inline: 16px; max-width: 100% · Let the label set the width. Translated text grows, and a short label grows the most, so "Add to bag" in Arabic will be longer than the English. In a fixed 96px box it wraps onto extra lines or spills out
Logical properties for anything that mirrors
Severity · Location · Before · After · Why
MEDIUM · CSS line 2, .info · padding-left: 20px; text-align: left · padding-inline-start: 20px; text-align: start · Under dir="rtl" the grid mirrors on its own and the photo moves to the right. padding-left stays on the left, so the 20px gap lands on the outer edge, the Arabic text runs into the photo, and its lines align to the wrong side
Part of a run in Claude (Opus 5.5), Nov 2026
What it does
- Groups items with space before lines or boxes.
- Keeps one main action on each view.
- Leaves room for longer translated text.
What's inside
better-layout/CREDITS.mdbetter-layout/LICENSEbetter-layout/SKILL.mdbetter-layout/agents/openai.yamlbetter-layout/grouping-and-alignment.mdbetter-layout/reporting.mdbetter-layout/spacing-and-adaptivity.md
How you use it
- Get the skill: one zip file. It comes with every paid plan.
- Add it to Claude. In Claude, open Customize (Plugins on newer screens), then Skills. Press +, then Create skill, then Upload a skill. In Claude Code, unzip it into ~/.claude/skills/ instead.
- Start a new chat and tell Claude what you need, the way the example above does. The skill takes it from there.
- Then ask for the work. Claude reaches for the skill when it fits, or name it: "use better-layout".
Get this skill with a paid plan
The download comes with every paid plan, along with all 204 Claude skills and the rest of the AI toolkit. “Sites that don't look templated” in this folder is free, so you can try one first.