/visual-design-principles:whitespace-densityfrom visual-design-principles
Guides spacing, padding, margin, and content density decisions using a 4px/8px spacing scale, macro vs micro whitespace, separation hierarchy, and vertical rhythm for layouts.
Ships in visual-design-principles. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
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:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
whitespace, spacing-system, padding, margin, vertical-rhythm, content-density
npx claudepluginhub oborchers/fractional-cto --plugin visual-design-principles12 skills in this plugin
/accessibility-inclusive-designThis skill should be used when the user is implementing accessible design, checking color contrast ratios, adding keyboard navigation, supporting screen readers, handling color blindness, implementing ARIA attributes, designing focus indicators, meeting WCAG 2.2 compliance, or building inclusive interfaces. Covers WCAG 2.2 AA requirements, color contrast (4.5:1 body, 3:1 large text), color independence (never rely on color alone), keyboard navigation, focus indicators, touch targets, screen reader considerations, and automated testing with axe-core./color-theory-applicationThis skill should be used when the user is selecting colors, building color palettes, defining color systems, implementing dark mode, choosing brand colors, creating shade scales, applying the 60-30-10 rule, selecting data visualization colors, or checking color contrast. Covers HSL color model, harmony schemes (complementary, analogous, triadic), systematic shade scale generation, WCAG contrast requirements, semantic color systems, and dark mode design./consistency-design-systemsThis skill should be used when the user is building a design system, defining design tokens, creating component libraries, implementing CSS custom properties, ensuring visual consistency across pages, choosing between design systems (Material, Ant, Carbon), or auditing a codebase for design consistency. Covers design tokens (primitive → semantic → component layers), atomic design methodology, token governance, and systematic consistency./craftsmanship-polishThis skill should be used when the user is polishing UI details, optimizing images, implementing shadows or elevation systems, ensuring pixel-perfect alignment, defining border-radius systems, adding micro-interactions or transitions, handling loading/empty/error states, or reducing Cumulative Layout Shift (CLS). Covers VisAWI Craftsmanship facet, retina-ready images, layered shadows, consistent border-radius, transition timing, skeleton screens, and layout stability./design-evaluation-scoringThis skill should be used when the user asks to evaluate, score, or audit a visual design, wants to compare designs quantitatively, needs an anti-pattern checklist, or wants to understand the 8-dimension design quality framework. Covers the VisAWI-aligned 8-dimension scoring methodology (1-5 per dimension, 40-point maximum), processing fluency theory, the anti-pattern rapid screening checklist, and the complete evaluation workflow./layout-spatial-structureThis skill should be used when the user is building or reviewing page layouts, grid systems, column structures, card grids, sidebar layouts, CSS Grid or Flexbox decisions, element alignment, spatial composition, or responsive grid strategies. Covers the 12-column grid, 8-point spacing system, Gestalt proximity principle, visual weight distribution, and layout patterns from Material Design and Bootstrap.Other plugins' skills for the same job