Back to skills
SKILL.md
Uxui Grid Layout Spacing
ASecurityEnforce responsive 4/8/12-column grids, 4pt/8pt spatial rhythm, concentric corner radius math, exact iOS/Mobile pixel spacing specs, anti-over-containerization, dynamic image layouts, and Hero section compositions. Use when setting up page layouts, CSS Grid/Flexbox, Tailwind spacing, padding/margins, mobile screens, bento grids, or landing page hero sections.
- 3 stars
- 0 votes
- 0 copies
- 2 views
- Added December 1, 2026
Works with
Security analysis
100/100npx -y skills add BlackOwl242/uxui-studio --skill uxui-grid-layout-spacing --agent claude-codeAre you the author of Uxui Grid Layout Spacing?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/blackowl242-uxui-grid-layout-spacing)---
name: uxui-grid-layout-spacing
description: >-
Enforce responsive 4/8/12-column grids, 4pt/8pt spatial rhythm, concentric corner radius math, exact iOS/Mobile pixel spacing specs, anti-over-containerization, dynamic image layouts, and Hero section compositions. Use when setting up page layouts, CSS Grid/Flexbox, Tailwind spacing, padding/margins, mobile screens, bento grids, or landing page hero sections.
---
# Grids, Layouts & Spatial Mathematics (`4pt / 8pt`)
## Overview
Eliminates arbitrary spacing, cramped boxes, and misaligned columns by enforcing deterministic grid specs, concentric geometry, and mobile/desktop spatial hierarchy.
For all 13 unabridged lessons, redline mobile wireframes, and 15 Hero section teardowns, read [module-02-grids-layouts-spacing.md](./references/module-02-grids-layouts-spacing.md).
---
## 1. Responsive Column Grid Standards ("Grids Are Not Always 12")
| Breakpoint / Device | Columns | Side Margin | Gutter | Max Content Container |
|---|:---:|:---:|:---:|---|
| **Mobile (`375px – 430px`)** | **`4`** | `16px` (`20px` on large phones) | `16px` | `100%` fluid (`343px` inner width on `375px` frame) |
| **Tablet (`768px – 1024px`)** | **`8`** | `32px` | `24px` | `100%` fluid |
| **Desktop (`1280px – 1440px+`)** | **`12`** | `Auto` (`>= 64px`) | `24px` (`24–32px`) | `1140px – 1280px` centered |
---
## 2. The 7 Mathematical Formulas of Clean Layout
1. **Concentric Corner Radius (`Outer = Inner + Padding`)**:
- Formula: `R_inner = max(0, R_outer - Padding)`.
- Example: Card `rounded-3xl` (`24px`) with `p-2` (`8px`) -> inner image/button MUST use `rounded-2xl` (`16px`). Card `32px` with `12px` padding -> inner `20px`. Never give parent and child the exact same border-radius!
2. **strict `8pt` Grid (`4pt` Micro-Steps)**:
- Allowed spacing scale ONLY: `4, 8, 12, 16, 20, 24, 32, 40, 48, 64, 80, 96, 120px`. Ban arbitrary `7px, 13px, 15px, 19px, 27px`.
3. **Internal <= External Rule (Box Grouping)**:
- A card's internal padding (`e.g., 16px`) must be smaller than or equal to the outer margin separating distinct sections (`24–32px`), and label-to-value gap (`4–8px`) must be tighter than card-to-card gap (`12–16px`).
4. **Same Relationship = Same Gap**:
- Every sibling pair of the same hierarchy level across the entire app must share the exact same token.
5. **Single Left Axis Alignment**:
- Snap page title, subtitle, card edges, form labels, and action buttons to ONE shared vertical left margin rather than indenting each block differently.
---
## 3. Exact Mobile & iOS Screen Redline Specs (`375×812pt` Reference)
- **Top Safe Area / Status Bar**: `>= 44px` (`44–59px` on modern iPhones).
- **Top Navigation Bar**: `44–56px` height (`44×44px` back/action tap targets, `8px` gap below status bar -> ~`96px` total top chrome).
- **Screen Side Margins**: `16px` left & right (`343px` usable content width on `375px`).
- **Title-to-Body / Heading-to-Content Gap**: `8px – 16px` (`12–16px` standard).
- **Between Sibling Cards**: `12px – 16px`.
- **Between Distinct Page Sections**: `24px – 32px` (`64–120px` on desktop landing pages).
- **Between Form Inputs**: `12px – 16px` vertical gap (`4–8px` between label and its input).
- **Inside Tabs / Segmented Pills**: `6–8px` vertical, `12–16px` horizontal, `4–6px` container inset.
- **Inside Primary Buttons**: `12–16px` vertical, `16–24px` horizontal (`48–56px` total height; `16px` clearance above iOS keyboard).
- **Bottom Tab Bar + Home Indicator**: `83px` total (`49–62px` nav items + `21–34px` bottom Home Indicator safe zone — **never** place interactive elements flush against `y=812`!).
---
## 4. Stop Over-Containerizing ("Space, Not Boxes")
- **Anti-Pattern (`❌`)**: Wrapping every title, stat, tag, and sub-section in nested bordered cards (`card-inside-card-inside-card`), stealing `32–48px` of mobile width and creating visual clutter.
- **Senior Fix (`✅`)**: Remove outer wrapper boxes and divider lines whenever **`24–32px` of whitespace + typographic hierarchy** already separates groups cleanly. Reserve card containers for genuinely interactive, clickable, or draggable units.
---
## 5. Core Page Archetypes, Image Layouts & Hero Sections
- **7 Core UI Layout Archetypes**: (1) Homepage (Hero -> Value Props -> Social Proof -> CTA), (2) Checkout/Payment (distraction-free, order summary + single-column steps), (3) Profile, (4) Dashboard (3–4 top KPIs + primary chart + recent table), (5) Search & Filter, (6) Product/Detail Page (visual gallery + sticky buy/action rail), (7) Settings.
- **5 Image Layout Rules**:
1. **Lead Image Dominance**: In multi-image views, make 1 hero image wide/large instead of a monotonous uniform grid.
2. **Asymmetric / Bento Rhythm**: Combine wide + tall + square spans to create scrolling momentum.
3. **Smart Text Flow**: Never wrap body copy awkwardly around tiny inline thumbnails — place full-width images cleanly above paragraphs or split into dedicated 2-column editorial blocks.
4. **Controlled Bleed**: Let showcase media extend slightly wider than the narrow text column (`65ch`) for an immersive editorial feel.
- **High-Impact Hero Section Formula**: Eyebrow badge/social proof (`+2,000 teams`) -> Clear outcome-driven H1 (`<= 2–3` lines, high contrast) -> Concise 1–2 line subhead -> Primary CTA + Secondary ghost CTA -> Crisp product UI showcase / interactive visual anchor above the fold.
Attribution
Related skills
View all in design →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.