Command Palette

Search for a command to run...

Назад к скиллам
скилл № 49491

css-layout-typography-patterns

CSS implementation patterns for layout, typography, color, spacing, and responsive design. Complements ui-design (fundamentals) with code-focused examples.

БесплатноБез исполняемых скриптов
rondoflowот rondoflow★ 37 звёзд на GitHub

Установить css-layout-typography-patterns в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Web Design Patterns

CSS implementation patterns for production-grade interfaces. For design fundamentals and decision-making, see ui-design. This skill focuses on code.

See also: ui-design for typography/color/spacing theory, frontend-design for creative aesthetics.

Installation

OpenClaw / Moltbot / Clawbot

npx clawhub@latest install web-design

Layout Principles

Use CSS Grid for two-dimensional layouts and Flexbox for one-dimensional flow. Choose the right tool for each context.

Layout Need Tool Why
Page-level structure CSS Grid (grid-template-areas) Named regions, explicit row/column control
Navigation bars Flexbox Single-axis alignment, spacing with gap
Card grids Grid (auto-fill / auto-fit) Responsive without media queries
Centering Grid (place-items: center) Shortest, most reliable centering
Sidebar + content Grid (grid-template-columns: 250px 1fr) Proportional sizing with fixed sidebar
Stacking overlaps Grid + grid-area: 1/1 Layer elements without position: absolute

Spatial Composition

Go beyond predictable layouts. Intentional asymmetry, overlapping elements, and grid-breaking accents create visual interest. Use grid stacking (grid-area: 1/1) instead of position: absolute for overlapping elements. Choose generous negative space for luxury/editorial aesthetics, or controlled density for data-rich interfaces — the choice must be intentional.

Typography

Typography carries 90% of a design's personality. Choose fonts that match the interface's purpose.

Context Display Font Direction Body Font Direction Example Pairing
Editorial / magazine High-contrast serif Neutral humanist sans Playfair Display + Source Sans 3
SaaS dashboard Geometric sans Matching weight sans DM Sans + DM Mono (data)
Creative portfolio Expressive display Clean readable sans Syne + Outfit
E-commerce luxury Thin modern serif Elegant sans Cormorant Garamond + Jost
Developer tooling Monospace display Monospace body JetBrains Mono + IBM Plex Mono

Type Scale

Use a consistent ratio. A 1.25 (major third) scale works for most interfaces: text-xs 0.64rem, text-sm 0.8rem, text-base 1rem, text-lg 1.25rem, text-xl 1.563rem, text-2xl 1.953rem, text-3xl 2.441rem, text-4xl 3.052rem. Set body text to 1rem (16px minimum), line-height 1.5 for body, 1.1–1.2 for headings. Limit line length to 60–75ch.

Color

Building a Palette

Every palette needs five functional roles:

Role Purpose Example Usage
Primary Brand identity, primary actions Buttons, links, active states
Neutral Text, borders, backgrounds Body text, cards, dividers
Accent Secondary actions, highlights Tags, badges, secondary buttons
Success / Warning / Error Semantic feedback Toasts, form validation, status
Surface Layered backgrounds Cards on page, modals on overlay

Contrast and Depth

Create depth through surface layering, not just shadows:

:root {
  --surface-0: hsl(220 15% 8%);    /* page background */
  --surface-1: hsl(220 15% 12%);   /* card */
  --surface-2: hsl(220 15% 16%);   /* raised element */
  --surface-3: hsl(220 15% 20%);   /* popover / modal */
}

Use HSL or OKLCH for perceptually uniform color manipulation. Dominant color with sharp accents outperforms evenly-distributed palettes. Always verify WCAG contrast: 4.5:1 for normal text, 3:1 for large text.

Spacing

Consistent spacing creates rhythm. Use an 8px base unit (or 4px for dense UIs):

Token Value Use
--space-1 0.25rem (4px) Inline icon gaps, tight padding
--space-2 0.5rem (8px) Input padding, compact lists
--space-3 0.75rem (12px) Button padding, card inner spacing
--space-4 1rem (16px) Default element spacing
--space-6 1.5rem (24px) Section padding, card gaps
--space-8 2rem (32px) Section separation
--space-12 3rem (48px) Major section breaks
--space-16 4rem (64px) Page-level vertical rhythm

Apply spacing consistently: use gap on Grid/Flexbox containers instead of margins on children. This eliminates margin-collapse bugs and simplifies responsive adjustments.

Visual Hierarchy

Guide the eye through deliberate contrast in size, weight, color, and space.

Hierarchy Techniques

Technique How Impact
Size contrast Hero heading 3–4x body size Immediate focal point
Weight contrast Bold headings + regular body Scannability
Color contrast Primary text vs muted secondary Information layering
Spatial grouping Tight spacing within groups, wide between Gestalt proximity
Elevation Shadows / surface layers Interactive affordance
Whitespace isolation Empty space around key elem
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • manifest.json

FAQ

Что делает скилл css-layout-typography-patterns?

CSS implementation patterns for layout, typography, color, spacing, and responsive design. Complements ui-design (fundamentals) with code-focused examples.

Как установить скилл css-layout-typography-patterns?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл css-layout-typography-patterns запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить css-layout-typography-patterns с