visual-design-principles/skills/whitespace-density/SKILL.md
This skill should be used when the user is adjusting spacing, padding, margins, content density, section gaps, vertical rhythm, or separation between elements. Also applies when reviewing whether a design feels cramped or too sparse, choosing between borders and whitespace for separation, or defining a spacing system. Covers the 4px/8px spacing system, macro vs micro whitespace, content density spectrum, separation techniques (whitespace > background shifts > borders), and vertical rhythm.
npx skillsauth add oborchers/fractional-cto whitespace-densityInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Whitespace is not empty space -- it is active structure. Research by Wichita State University found that increased whitespace between paragraphs and around margins improved comprehension by 20%. The Refactoring UI principle is clear: start with too much whitespace, then remove until it feels right. Never start tight and try to add space later.
Macro whitespace is the space between major sections, around the content frame, and between layout regions. It establishes page-level breathing room and visual grouping.
Micro whitespace is the space within components -- between a label and its input, between list items, between an icon and its text. It determines readability and component density.
Both must be intentional. Macro whitespace without micro whitespace produces elegant-looking layouts with unreadable components. Micro whitespace without macro whitespace produces readable components floating in a cramped sea.
Define a constrained spacing scale using a 4px base unit. Every spacing value in the system must come from this scale.
:root {
--space-1: 4px; /* micro: icon-text gap */
--space-2: 8px; /* micro: inline element gap */
--space-3: 12px; /* micro: related element gap */
--space-4: 16px; /* standard component padding */
--space-5: 20px; /* component internal sections */
--space-6: 24px; /* between related components */
--space-8: 32px; /* between distinct components */
--space-10: 40px; /* compact section gap */
--space-12: 48px; /* standard section gap */
--space-16: 64px; /* generous section gap */
--space-24: 96px; /* premium section gap */
--space-32: 128px; /* hero/premium section gap */
}
| Context | Whitespace % | Example | |---------|-------------|---------| | News sites | 20--30% | CNN, Reuters | | SaaS dashboards | 25--35% | Datadog, Grafana | | Corporate / SaaS marketing | 35--45% | Stripe docs, GitHub | | Premium / luxury | 50--65% | Apple product pages | | Apple homepage hero | 60--70% | apple.com |
Use the lightest-weight separation technique that works. Heavier separators add visual noise.
Prefer in this order:
--color-bg-subtle)Borders are visual clutter. Every border competes for attention. Use them only when spacing alone cannot communicate grouping.
Internal spacing must be no more than 50% of external spacing. This is Gestalt proximity: elements that are closer together are perceived as belonging together.
| Relationship | Spacing |
|-------------|---------|
| Within a group (internal) | --space-2 to --space-4 |
| Between groups (external) | --space-6 to --space-12 |
| Between sections | --space-12 to --space-32 |
If the gap between a label and its input is the same as the gap between two form groups, the user cannot parse the structure at a glance.
| Density | Section Gap | Use Case | |---------|-------------|----------| | Compact | 32--48px | Dashboards, data-heavy apps | | Standard | 64--96px | SaaS marketing, documentation | | Premium | 96--128px+ | Landing pages, brand sites |
Vertical rhythm rule: Section gap standard deviation must be 8px or less. Inconsistent section gaps destroy the sense of structure. Pick one gap value per page density and use it everywhere.
| Anti-Pattern | Problem | Fix |
|-------------|---------|-----|
| Edge-to-edge cramming | Content touching container edges | Add --space-4 to --space-6 padding minimum |
| Borders everywhere | Visual noise, heavy feel | Replace with whitespace or background shifts |
| Inconsistent spacing | No visual rhythm, feels unpolished | Use the spacing scale exclusively |
| Claustrophobic layouts | Users feel overwhelmed | Start with 2x the spacing you think you need |
| Equal internal/external gaps | Groups unreadable | Internal spacing <= 50% of external |
Working implementations in examples/:
examples/spacing-system-and-separation.md -- Complete spacing system in CSS/Tailwind/React, demonstrates separation without bordersWhen reviewing or building spacing and density:
tools
This skill should be used when the user invokes any /plan-* command from the planning-tools plugin (/plan-context, /plan-master, /plan-open-questions, /plan-verify, /plan-tick, /plan-progress, /plan-delete), asks how Claude Code's plan files work, asks where plans are stored, asks to author or audit a multi-phase master planning document, asks how to walk through a plan's Open Questions interactively, asks how to write progress entries, or mentions ~/.claude/plans/ or .claude/planning-tools.local.md. Provides the index of planning-tools commands, the master-plan workflow lifecycle, the v0.3.0+ list-shape mandate (phases and questions as headings + bulleted scope items, never tables), the v0.3.2+ plain-bullet shape (no `- [ ]` checkboxes — heading emoji is the sole tick signal), the progress-entry methodology, and the mechanics of Claude Code's plan-mode file storage.
testing
This skill should be used by the plan-verifier agent and the /plan-verify command to audit a drafted master plan against a fixed checklist. Covers universal-core completeness, the v0.3.0+ no-tables-for-phases-or-questions rule, trigger-based section-coverage gaps, phase actionability (heading + per-phase TL;DR + bulleted scope + exit criteria), the v0.3.1+ per-phase TL;DR requirement, the v0.3.2+ plain-bullet scope shape (legacy `- [ ]`/`- [x]` accepted silently), the v0.3.3+ context-block shape (plan-level `**TL;DR:**` + bulleted metadata, legacy `>` blockquote accepted silently), integer phase numbering enforcement, dependency traceability, citation resolution, callout/evidence convention compliance, Open Questions placement, and the one-PR-per-master-plan rule. Single-owner of the audit checklist.
tools
This skill should be used when authoring, reviewing, or modifying a multi-phase master planning document via the planning-tools plugin (especially the /plan-master and /plan-verify commands). Codifies the universal core sections, trigger-based optional sections, integer-only phase numbering, Open Questions placement, one-PR-per-plan rule, status conventions, evidence attribution, callouts, cross-reference formats, the v0.3.0 list-shape mandate (phases and questions are heading + bulleted list, never markdown tables), the v0.3.1 per-phase TL;DR requirement (1–3 sentence what/why summary under each phase heading for glance-ability), the v0.3.2 plain-bullet scope shape (`- <action>` items, no `- [ ]` checkboxes — the phase status emoji is the sole tick signal), and the v0.3.3 context-block shape (a plan-level `**TL;DR:**` + a bulleted metadata list instead of a `>` blockquote; legacy blockquote blocks accepted silently). Project-agnostic — no ticket-prefix or plan-type taxonomy.
development
This skill should be used when the user is defining brand personality in design, choosing between illustration and photography, adding motion or animation, creating visual motifs, ensuring layout variety, customizing CSS framework defaults, or calibrating the level of creative expression for a given context. Covers Lavie & Tractinsky's expressive aesthetics, the expression spectrum (restrained to bold), brand personality translation, illustration systems, photography direction, and template independence.