跳到正文
cccskills
免费在 GitHub 公开

apply-consistent-spacing

Use systematic spacing with 25% minimum jumps, start with excess whitespace

中文简介正在准备中。当前显示原文说明。

karanmrn/karanagentskills星标 3(GitHub 3 + cccskills 0)

实测评分 未实测

查看安装方法

包含的文件(1)

  • SKILL.md6.3 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Skill: Apply Consistent Spacing

Purpose

Use a systematic spacing scale to create rhythm, group related elements, and separate distinct sections while starting with generous whitespace and removing as needed.

Type

Generative + Evaluative

Input

  • UI layout or component structure
  • Content grouping (what belongs together)
  • Desired density (compact vs. airy)
  • Base unit (default: 16px)

Output

  • Spacing scale specification
  • Margin/padding values for each element
  • Pass/Fail assessment of existing spacing

Transformation Performed

Maps spatial relationships to a systematic spacing scale with minimum 25% differences between values, ensuring clear grouping and breathing room.

Decision Criteria

PASS (Good Spacing)

  • Uses systematic scale with minimum 25% jumps between values (12px → 16px → 24px → 32px)
  • Related elements have smaller gaps (4-16px within groups)
  • Unrelated sections have larger gaps (24-64px between groups)
  • More space around groups than within groups (ambiguous spacing avoided)
  • Consistent internal padding (cards, buttons, inputs)
  • White space creates breathing room (doesn't fill entire screen width)
  • Uses whitespace instead of borders for separation

FAIL (Poor Spacing)

  • Arbitrary values without system (13px, 27px, 41px)
  • Values too similar (<25% difference - can't distinguish)
  • Related elements too far apart (weakens grouping)
  • Unrelated elements too close together (ambiguous relationships)
  • Equal spacing everywhere (within groups = between groups)
  • Content stretched to fill wide canvas unnecessarily
  • Using borders when whitespace would suffice

The Spacing Scale

Systematic Scale (25% minimum jumps)

Base: 16px (browser default)

4px, 8px, 12px, 16px, 24px, 32px, 48px, 64px, 96px

Why these values:

  • 4px → 8px = 100% jump (small end needs bigger jumps)
  • 8px → 12px = 50% jump
  • 12px → 16px = 33% jump
  • 16px → 24px = 50% jump
  • 24px → 32px = 33% jump
  • 32px → 48px = 50% jump
  • 48px → 64px = 33% jump
  • 64px → 96px = 50% jump

Common Usage Patterns

SpacingUsage
4pxIcon gaps, tight internal padding
8pxSmall component gaps, tight button padding
12pxInput padding, component internal spacing
16pxStandard gap, card padding
24pxSection internal padding, larger gaps
32pxMajor section separation
48-64pxPage section breaks
96pxHero sections, major page divisions

The Proximity Principle

  • Elements closer together appear related
  • Elements farther apart appear unrelated
  • More space around groups than within groups
  • Use spacing to show relationships without borders

Key Principles

1. Start With Too Much Whitespace

Instead of adding space until something looks okay, start with way too much space and remove until it's right.

Why: Elements given minimum breathing room look "not actively bad" but not great. Starting with excess ensures adequate whitespace in the final design.

2. Avoid Ambiguous Spacing

Ensure there is more space around the entire group than within the group.

Example - Form Labels:

  • ❌ Label margin-bottom: 12px, Input margin-bottom: 12px (equal = ambiguous)
  • ✅ Label margin-bottom: 4px, Input margin-bottom: 24px (within < around = clear)

3. Don't Fill The Whole Screen

Just because you have 1200-1400px of canvas doesn't mean content should stretch to fill it.

  • Give elements exactly the space they need
  • If you have extra room, leave it as whitespace
  • Paragraph max-width: 600px is fine even if nav is 1200px
  • Shrink the canvas if designing small interfaces

4. Whitespace > Borders

Instead of using borders to separate elements:

  • Add extra spacing between groups
  • Use different background colors
  • Use subtle box shadows (less distracting than borders)

Visual/UX Signals Used

  1. Proximity: Closer elements = related
  2. Ambiguity gap: More space around groups than within
  3. Breathing room: Generous space = cleaner, more polished
  4. Canvas utilization: Don't stretch to fill; use what you need

Common Failure Modes

FailureDescriptionFix
Arbitrary Values15px here, 17px thereUse systematic scale exclusively
Weak GroupingEqual spacing within and between groupsMake between-group spacing significantly larger
Ambiguous SpacingLabel and input have same marginReduce within-group, increase between-groups
Border-DependenceUsing borders instead of spaceIncrease gap, remove border
Canvas FillingContent stretched to 1200px unnecessarilyUse only the space needed; let whitespace fill rest
Minimal Breathing RoomAdding just enough space to not look badStart with excess, remove until right
Inconsistent PaddingSome buttons 8px, others 12pxPick one scale value, apply everywhere

Prerequisites

  • Content grouped by relationship
  • Visual hierarchy established

Dependencies

  • establish-visual-hierarchy (spacing reinforces hierarchy)
  • group-related-elements (proximity shows relationships)

Refactoring UI References

  • "Start with too much white space"
  • "Establish a spacing and sizing system" (25% minimum jumps)
  • "Avoid ambiguous spacing"
  • "Don't fill the whole screen"
  • "Use fewer borders"
  • "White space should be removed, not added"

Example Assessment

Input: Form with: Title (margin-bottom: 16px), Label (margin-bottom: 12px), Input (margin-bottom: 12px), next Label (margin-top: 12px)

Evaluation: FAIL - Ambiguous spacing

  • Label to Input: 12px
  • Input to next Label: 12px
  • No clear grouping - user can't tell which label belongs to which input

Recommendation:

  • Title margin-bottom: 24px (separate section)
  • Label margin-bottom: 4px (tight coupling to input)
  • Input margin-bottom: 24px (clear separation to next group)
  • Result: Within-group (4px) << Between-groups (24px) = Clear relationship

Before:

Label A
[Input A]
Label B    <- Ambiguous: belongs to A or B?
[Input B]

After:

Label A
[Input A]

Label B    <- Clearly belongs to B
[Input B]

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Automate 21risk tasks via Rube MCP (Composio). Always search tools first for current schemas.

中文简介正在准备中。当前显示原文说明。

karanmrn/karanagentskills32026年8月28日 更新

Automate 2chat tasks via Rube MCP (Composio). Always search tools first for current schemas.

中文简介正在准备中。当前显示原文说明。

karanmrn/karanagentskills32026年8月28日 更新

1password

免费

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

中文简介正在准备中。当前显示原文说明。

karanmrn/karanagentskills32026年8月28日 更新

Build integrated IS/BS/CF financial workbooks in Excel.

中文简介正在准备中。当前显示原文说明。

karanmrn/karanagentskills32026年8月28日 更新

9router

免费

Entry point for 9Router — local/remote AI gateway with OpenAI-compatible REST for chat, image, TTS, embeddings, web search, web fetch. Use when the user mentions 9Router, NINEROUTER_URL, or wants AI without writing provider boilerplate. This skill covers setup + indexes capability skills; fetch the relevant capability SKILL.md from the URLs below when needed.

中文简介正在准备中。当前显示原文说明。

karanmrn/karanagentskills32026年8月28日 更新

Chat / code generation via 9Router using OpenAI /v1/chat/completions or Anthropic /v1/messages format with streaming + auto-fallback combos. Use when the user wants to ask an LLM, generate code, summarize text, or run prompts through 9Router.

中文简介正在准备中。当前显示原文说明。

karanmrn/karanagentskills32026年8月28日 更新

查看 karanmrn 的全部技能

报告此技能的问题