web-layout-conventions
Skill7 starsChanged 3 days agoMITView on GitHub
Web page layout in CSS: mobile-first, overflow, truncation, type scale, spacing, tables. TRIGGER when: writing CSS, Tailwind classes or inline styles; laying out a web page, table, card grid or dashboard; user says a web UI looks cramped, cut off or misaligned. SKIP when: the UI is not rendered by a browser, or no layout or styling changes.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- leroyguillaume/skillsword for word, first seen Nov 22, 2026
Other versions1 project uses a version of this.
Word for word · 1
- leroyguillaume/skills★ 7100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
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 repository54 other files it gives its agents.
- adr-conventionsSkill
- api-conventionsSkill
- architecture-conventionsSkill
- argocd-conventionsSkill
- ci-conventionsSkill
- config-conventionsSkill
- contributing-conventionsSkill
- councilSkill
- cryptography-conventionsSkill
- dependency-update-conventionsSkill
- diagram-conventionsSkill
- docker-conventionsSkill
- documentation-conventionsSkill
- frontend-conventionsSkill
- github-actions-conventionsSkill
- github-issue-conventionsSkill
- github-pr-conventionsSkill
- github-repo-settingsSkill
- gitlab-ci-conventionsSkill
- helm-conventionsSkill
- herdr-core-delegationSkill
- herdr-delegationSkill
- herdr-tui-delegationSkill
- kopf-conventionsSkill
- kubernetes-operator-conventionsSkill
- logging-conventionsSkill
- logo-conventionsSkill
- mise-conventionsSkill
- ollama-conventionsSkill
- openssf-conventionsSkill
- pr-conventionsSkill
- pre-commit-conventionsSkill
- project-metadata-conventionsSkill
- python-async-conventionsSkill
- python-conventionsSkill
- readme-conventionsSkill
- release-script-conventionsSkill
- release-supply-chain-conventionsSkill
- renovate-ci-conventionsSkill
- rest-conventionsSkill
- rust-build-conventionsSkill
- rust-conventionsSkill
- rust-http-conventionsSkill
- security-policy-conventionsSkill
- signal-handling-conventionsSkill
- sql-conventionsSkill
- starlight-conventionsSkill
- systemd-conventionsSkill
- system-user-conventionsSkill
- task-conventionsSkill
- terraform-conventionsSkill
- topic-splittingSkill
- ui-copy-conventionsSkill
- yaml-conventionsSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 95
Every badge, button or table of a kind looks the same.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Web layout conventions
For any page a browser renders. Where things sit and how big they are; the
words are ui-copy-conventions. Each rule has a check that holds on the
rendered page.
Mobile first
- The styles outside any media query are the mobile layout; wider layouts
layer on with
min-widthbreakpoints (Tailwind'ssm:/md:/lg:aremin-width). Never amax-widthbreakpoint layered down from a desktop base, never a default layout that assumes a wide viewport: at the narrowest viewport, no media query matches and the page reads as intended.
Nothing leaves its box
- Text never overflows its block, overlaps another, or scrolls the page
sideways. Check: each text element's box lies within its parent's, no two
siblings' boxes intersect, and at the narrowest viewport the root's
scrollWidthequals itsclientWidth. - Fix in this order: wrap (
overflow-wrap: anywhereon long unbroken strings,min-width: 0on flex and grid children, whose defaultmin-width: autorefuses to shrink and is the usual cause of a page-wide scroll); shorten, with the full value reachable; scroll a wide table in its ownoverflow-x: autocontainer, never the page.
The value that matters is never cut
- Never truncate a row's name, amount or status while the row has room: give the width to the column that carries meaning.
- A truncated value stays reachable on hover and on focus or tap: a
titlealone shows nothing on a touch screen. - Numbers are never cut. One too wide is scaled, with one scale per
column stated in its header — "Revenue (k€)" — never
1.2Mnext to950. - One wrapped label must not double one row's height: shorten it, or give every row the same sub-line.
Type hierarchy
- Size follows importance, never inverted: a heading is never smaller than what it heads, a legend never larger than what it labels.
- Never flat: page title, section titles and body are visibly different.
- At most five font sizes and three weights, each a token (CSS custom
property or theme scale): no one-off
font-size: 13.5px. - Table headers and labels stay at body size or one step below, and never all-caps below body size.
Spacing and grouping
- One spacing scale (
4, 8, 12, 16, 24, 32, 48px) as tokens: nomargin: 13px, nomt-[13px]. - The gap inside a group is at least one step smaller than between groups; an element between two blocks sits closer to the one it belongs to.
- A value stays next to its unit and annotation: no
space-betweenpushing "(estimated)" to the far edge;12 kgso they never wrap apart.
Blocks size to their content
max-width,fit-contentorrepeat(auto-fill, minmax(16rem, 1fr)), not full-width blocks holding one short line.- Prose capped at
max-width: 75ch. - Cards keep their own heights:
align-items: starton the grid, not every card stretched to the tallest. - Items of one kind in a row or grid align on one edge, whatever each
holds:
align-items: start, notcenterunder captions of different heights, and an empty slot takes the same box as a filled one. Check: every item's visual has the samegetBoundingClientRect().top.
Tables
- The column the user scans for comes right after the row's identifier, not last off the right edge.
- Numbers right-aligned with
font-variant-numeric: tabular-nums, the same decimals down a column, the header aligned like its values. - Actions in the last column, right-aligned, buttons of one width or icons of one size, in the same order on every row; an unavailable one leaves its slot empty or disabled.
One look per component
Every badge, button or table of a kind looks the same; a variant (danger,
small) is a named modifier defined once, not a restyle at the call site. When
repeated markup becomes a shared component is the rule of three in
CLAUDE.md.
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.

