Skip to content
fix-spacing logo

Fix Spacing Issues

fix-spacing

This skill should be used when elements feel disconnected, cards float like islands, or groupings are unclear. Applies Law of Proximity, Law of Common Region, and Law of Uniform Connectedness.

SKILL.md

Full skill instructions

Fix Spacing Issues

Purpose

This skill diagnoses and fixes spacing issues that make interfaces feel disconnected or unclear. It applies three fundamental perceptual laws to create proper visual grouping and hierarchy through strategic use of whitespace, boundaries, and visual connections.

Applies these laws from lawsofux.com:

  • Law of Proximity: Objects near each other appear grouped
  • Law of Common Region: Elements sharing a boundary appear related
  • Law of Uniform Connectedness: Visually connected elements seem more related

When to Use

  • "Cards feel like islands"
  • "Everything is the same distance apart"
  • "Elements feel disconnected"
  • "Groupings are unclear"
  • "No visual rhythm"

The Laws

Law of Proximity

Objects that are near each other tend to be grouped together.

Application:

Space WITHIN groups < Space BETWEEN groups

Card padding < Gap between cards < Section gap

Violation test:

Proximity Ratio = internal spacing / external spacing
PASS: ratio < 1.0
FAIL: ratio ≥ 1.0

Law of Common Region

Elements tend to be perceived as groups if they share a clearly defined boundary.

Application:

  • Add backgrounds, borders, or containers to create regions
  • Don't rely on proximity alone for complex groupings
  • Nested regions show hierarchy

Law of Uniform Connectedness

Elements that are visually connected are perceived as more related than elements with no connection.

Application:

  • Lines, arrows, or shared colors connect related items
  • Timelines, flowcharts, breadcrumbs use this
  • Stronger than proximity for showing relationships

Diagnosis

For each group of elements, check:

1. PROXIMITY: Is internal < external spacing?
2. REGION: Do related items share a boundary?
3. CONNECTION: Are sequential items visually linked?

Output Format

SPACING DIAGNOSIS

Law of Proximity:
WHERE: [component]
Ratio: [internal]px / [external]px = [X]
Violation: [Yes/​No]
FIX: [change]

Law of Common Region:
WHERE: [component]
Issue: [missing boundary / competing regions]
FIX: [add container / adjust]

Law of Uniform Connectedness:
WHERE: [component]
Issue: [disconnected sequence]
FIX: [add connector]

Quick Reference

SpacingTailwindUse for
4pxgap-1, p-1Tight inline elements
8pxgap-2, p-2Related items in a group
16pxgap-4, p-4Items within a card
24pxgap-6, p-6Cards in a grid
32pxgap-8Between sections
48-64pxpy-12/​16Major section breaks

Rule: Each level should be ~1.5-2x the previous.

More Other skills

Delegate independent tasks to specialized agents working concurrently with isolated context.

295.4K 206.3K
View

Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.

179.7K 100.1K
View

Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.

179.7K 89.5K
View

A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).

179.7K 76.1K
View

Fundamental design principles for writing maintainable, testable Python code.

40.2K 21.9K
View

Modern responsive layouts using container queries, fluid typography, CSS Grid, and mobile-first strategies.

40.2K 20K
View

Generate Playwright tests from scenarios using interactive browser exploration and validation.

39.7K 18.2K
View

Modern React state management with Redux Toolkit, Zustand, Jotai, and React Query for every state category.

40.2K 14.7K
View

GDPR-compliant data handling with consent management, data subject rights, and privacy controls.

40.2K 14.3K
View

Python error handling patterns including input validation, exception hierarchies, and partial failure handling. Use when implementing validation logic, designing exception strategies, handling batch processing failures, or building robust APIs.

40.2K 13.5K
View

Detailed multi-file refactor planning with safety checks and rollback guidance.

39.7K 13K
View