Skip to content

design

FieldValue
TypeSkill
Source~/.copilot/skills/design/SKILL.md
DescriptionThe visual law for any framework — writing/editing CSS, “style this”, “add styles”, Tailwind utility classes, BEM class names, design tokens/CSS custom properties, theming, dark mode, light/dark, multiple themes, print styles/@media print, responsive layout, spacing/padding/margins, motion/transitions, typography/font scale, corner radius, color palette/contrast/WCAG, icon layout (“leading icon”, “trailing icon”, “icon stacking”), border discipline (“nested border”, “borders in borders”), card layout, action button placement, grid layout for icons, content below icon, component APIs/variants/states, design system, developer handoff, 8pt grid, breakpoints. Absorbs css, design-principles, and ui-design-system — CSS mechanics, visual/layout enforcement, and token stewardship all route here. NOT component logic (frontend), prose (technical-writing), or ADR rationale (adr, cited by number).

Bundled Pages

GroupNameSource
ReferencesColors~/.copilot/skills/design/references/colors.md
ReferencesCorner Radius~/.copilot/skills/design/references/radius.md
ReferencesFoundation: Accessibility~/.copilot/skills/design/references/foundation-a11y.md
ReferencesFoundation: Docs Hierarchy (Nested Outline)~/.copilot/skills/design/references/docs-hierarchy.md
ReferencesFoundation: List Indents~/.copilot/skills/design/references/lists.md
ReferencesIcon Layout and Border Discipline~/.copilot/skills/design/references/icon-and-border.md
ReferencesMotion~/.copilot/skills/design/references/motion.md
ReferencesSpacing~/.copilot/skills/design/references/spacing.md
ReferencesTokens and Theming~/.copilot/skills/design/references/tokens-and-theming.md
ReferencesTypography~/.copilot/skills/design/references/typography.md
References Assets StylelintPackage~/.copilot/skills/design/references/assets/stylelint/package.json
References Assets StylelintPackage Lock~/.copilot/skills/design/references/assets/stylelint/package-lock.json
References Assets StylelintStylelint.config~/.copilot/skills/design/references/assets/stylelint/stylelint.config.mjs
References Assets Stylelint PluginsIndex~/.copilot/skills/design/references/assets/stylelint/plugins/index.mjs
References CssBEM and Tailwind: One Job Each~/.copilot/skills/design/references/css/bem-and-tailwind.md
References CssComments and Naming~/.copilot/skills/design/references/css/comments-and-naming.md
References CssCSS Architecture and Performance~/.copilot/skills/design/references/css/architecture.md
References CssCSS Hard Rules~/.copilot/skills/design/references/css/hard-rules.md
References CssCSS linting and validation~/.copilot/skills/design/references/css/linting.md
References CssModern CSS: Container Queries, :has(), OKLCH, Cascade Layers~/.copilot/skills/design/references/css/modern-layout.md
References CssPrint and legal documents~/.copilot/skills/design/references/css/print-and-legal.md
References CssWorking with Tailwind~/.copilot/skills/design/references/css/tailwind-config.md
ResourcesLints~/.copilot/skills/design/lints.toml
ScriptsCheck~/.copilot/skills/design/scripts/check.sh
ScriptsCheck_colocation~/.copilot/skills/design/scripts/check_colocation.py
ScriptsCheck_contrast~/.copilot/skills/design/scripts/check_contrast.py
ScriptsCheck_css_budget~/.copilot/skills/design/scripts/check_css_budget.py
ScriptsCheck_theme_completeness~/.copilot/skills/design/scripts/check_theme_completeness.py
ScriptsDesign_token_generator~/.copilot/skills/design/scripts/design_token_generator.py
ScriptsLint~/.copilot/skills/design/scripts/lint.py
ScriptsLint_css~/.copilot/skills/design/scripts/lint_css.sh
ScriptsLint_design_principles~/.copilot/skills/design/scripts/lint_design_principles.sh
ScriptsLint_tokens~/.copilot/skills/design/scripts/lint_tokens.sh

Source Content

Design

DomainThe visual law — how CSS is written, how components lay out, and what the token vocabulary is
RoleCSS mechanic + visual-design enforcer + token steward, in one front door
OutputToken-driven, theme-safe, symmetric, accessible CSS/Tailwind/component code, gated by scripts/check.sh

This skill absorbed the former css, design-principles, and ui-design-system skills — their rules live in this skill’s own references/, and nothing invokes them separately. Binding decisions (ADR-001 through ADR-009, ADR-013, ADR-018) live in the adr skill (decision index) — cite the ADR, do not restate it.

Route by task

You’re…ReadGate with
Writing or editing any .css file, BEM, Tailwind utilitiesreferences/css/bem-and-tailwind.md, references/css/architecture.md, references/css/tailwind-config.mdscripts/lint_css.sh
Checking the CSS hard rules (tokens, symmetry, margins, dedup)references/css/hard-rules.mdscripts/lint_css.sh
Writing comments or naming classes/HTMLreferences/css/comments-and-naming.md-
Building any icon-bearing component (leading/trailing icon)references/icon-and-border.md (ADR-009)scripts/lint_design_principles.sh
Adding or reviewing a border, nested card, or overlayreferences/icon-and-border.md (ADR-008)scripts/lint_design_principles.sh
Defining or changing a color, token, or theme (light/dark/multi)references/tokens-and-theming.mdscripts/check_contrast.py + scripts/check_theme_completeness.py
Picking a semantic color classreferences/colors.mdscripts/lint_tokens.sh
Generating a token set from a brand colorreferences/tokens-and-theming.md#generating-a-token-set-from-a-brand-colorscripts/design_token_generator.py
Sizing type, choosing a font, or applying the type scalereferences/typography.md (ADR-003)scripts/lint_tokens.sh
Setting a corner radiusreferences/radius.md (ADR-002)scripts/lint_tokens.sh
Applying padding, margin, or gapreferences/spacing.mdscripts/lint_css.sh
Adding a transition or animationreferences/motion.md (ADR-004)scripts/lint_css.sh
Writing @media print or a legal/court document layoutreferences/css/print-and-legal.md-
Checking accessibility (contrast, focus, ARIA, touch targets)references/foundation-a11y.md (ADR-005)scripts/check_contrast.py
Nested docs/MDX prose hierarchy or list indentsreferences/docs-hierarchy.md, references/lists.md-
Verifying every component has co-located CSS, or CSS budgetreferences/css/architecture.mdscripts/check_colocation.py + scripts/check_css_budget.py
Validating anything already written-scripts/check.sh <path>

References load lazily — a one-line padding fix never pays for the whole token pipeline.

House rules

  1. Tokens only for color, spacing, and radius (ADR-001, ADR-002, ADR-006). Every color is a CSS custom property; every radius comes from the [data-radius] scale; every space comes from the 8pt scale. Never a raw hex, Tailwind palette number, or arbitrary pixel value. See references/tokens-and-theming.md, references/radius.md, references/spacing.md.
  2. BEM and Tailwind never own the same responsibility (ADR — house convention, see references/css/bem-and-tailwind.md). BEM owns identity (variant, state); Tailwind owns arrangement (layout, spacing, one-offs). Never both on the same property of the same element.
  3. Icon-text layout is always a CSS grid (ADR-009). grid-cols-[auto_1fr] or [auto_1fr_auto], never flex-col on an icon row. Content never stacks below an icon. See references/icon-and-border.md.
  4. One neutral border per local stack (ADR-008). If the parent already has border border-border, the child does not add another. Prefer bg-muted/40. See references/icon-and-border.md.
  5. Typography is the system stack only, no web fonts (ADR-003). font-serif/font-body resolve to -apple-system, "Segoe UI", system-ui, sans-serif. Hierarchy comes from ui-type-* size/weight tokens. See references/typography.md.
  6. No margins on components; margins live at the layout layer. Components own padding and internal spacing only. See references/spacing.md.
  7. Print is black and white, one central stylesheet, never per-component. See references/css/print-and-legal.md.
  8. WCAG 2.2 AA is the floor, AAA the target (ADR-005). 4.5:1 normal text / 3:1 large text and UI components; every interactive element has a visible focus ring; 44×44px touch targets; never color alone. See references/foundation-a11y.md.
  9. Numbers and currency are always locale-formatted (ADR-013). formatCurrency/formatNumber/formatPercent at the display layer — never raw toFixed() or string interpolation.
  10. Never transition: all; always honor prefers-reduced-motion (ADR-004). Name the exact properties. See references/motion.md.
  11. Co-locate component CSS; never duplicate a rule. Every component folder has its own .css, even if empty; shared visuals become one reusable class. See references/css/architecture.md.
  12. Multiple themes are the default assumption. A theme is a new selector block re-pointing the same semantic names — never a markup-level class swap. See references/tokens-and-theming.md.

Don’t use me for

  • Component state, data flow, hooks, routing → frontend (react-engineer).
  • Prose, Markdown mechanics, Mermaid diagrams → technical-writing.
  • The ADR record and rationale behind a rule cited here → adr skill (this skill cites by number, never restates).
  • Storybook story shape, argTypes, hierarchy moves → frontend’s Storybook references.
  • Product/UX research, personas, journey maps → ux.

How I work

  1. Identify the task from the routing table above and load only the reference(s) it points to.
  2. Apply the house rules — tokens, grid, single border, system font stack, spacing scale, print, motion, a11y.
  3. Write or edit the CSS/TSX, citing the ADR number for any rule enforced (never restating the ADR’s own text).
  4. Validate with scripts/check.sh <path> — it dispatches Stylelint, the Python CSS checks, the icon-grid/border heuristic, and the token heuristic by file type, in one call. Run the narrower individual script instead when only one topic changed.
  5. Fix every reported error; warnings and heuristic flags get a second look, not a dismissal.

Self-rubric (run before I respond)

  • Colors, spacing, and radius are tokens only — no hex, palette numbers, or arbitrary values.
  • BEM and Tailwind do not own the same property on the same element.
  • Every icon row is a CSS grid (grid-cols-[auto_1fr...]), never flex-col.
  • No more than one neutral border per local stack.
  • Typography uses the system stack only; hierarchy comes from ui-type-* tokens.
  • No margin on a component; outer spacing lives at the layout layer.
  • Print survives in black and white from the one central stylesheet.
  • Contrast checked (4.5:1 / 3:1 AA) on every token pair touched; focus rings visible; touch targets ≥ 44×44px.
  • Transitions name their properties and honor prefers-reduced-motion.
  • Every component folder has a co-located .css; no duplicated rules.
  • scripts/check.sh <path> exits 0 (or the narrower script for the one topic that changed).

Validate

scripts/lint.py FILE [FILE ...] (or --git-changed) is the one-command dispatcher — reads lints.toml and runs every registered check whose globs match, skipping the rest. Adding a check is a lints.toml append. Each underlying script (lint_css.sh, check_contrast.py, check_theme_completeness.py, check_css_budget.py, check_colocation.py, lint_design_principles.sh, lint_tokens.sh) still runs standalone.

References

TopicFile
Modern CSS: container queries, :has(), OKLCH, cascade layersreferences/css/modern-layout.md
CSS hard rules (canonical)references/css/hard-rules.md
BEM + Tailwind coexistencereferences/css/bem-and-tailwind.md
CSS file architecture, co-location, layersreferences/css/architecture.md
Comments and semantic namingreferences/css/comments-and-naming.md
Stylelint + the four Python checksreferences/css/linting.md
Print and legal-document disciplinereferences/css/print-and-legal.md
Tailwind config wiringreferences/css/tailwind-config.md
Tokens, theming, brand-color generation, component architecture, responsive calc, handoffreferences/tokens-and-theming.md
Icon-grid (ADR-009) + border discipline (ADR-008) + component patternsreferences/icon-and-border.md
Accessibility (WCAG, semantic HTML, ARIA, focus, touch targets)references/foundation-a11y.md
Spacing scale, --ui-pad-* values, layout primitivesreferences/spacing.md
Motion tokens, utility classes, animate-* classesreferences/motion.md
Typography scale, ui-type-* classes, print typereferences/typography.md
Corner radius presets and component mapreferences/radius.md
Semantic color quick rulesreferences/colors.md
Docs/MDX nested-outline hierarchyreferences/docs-hierarchy.md
List indent discipline in docs prosereferences/lists.md
Vendored print/legal/motion/Stylelint assetsreferences/assets/
One-command validation dispatcherscripts/check.sh
Stylelint wrapper (repo → skill → PATH, graceful skip)scripts/lint_css.sh
WCAG contrast checkerscripts/check_contrast.py
Theme-completeness checkerscripts/check_theme_completeness.py
Co-location checkerscripts/check_colocation.py
CSS size + @import-depth budget checkerscripts/check_css_budget.py
Icon-grid (ADR-009) + border (ADR-008) heuristicscripts/lint_design_principles.sh
Token/font/radius heuristic (ADR-001/002/003/006)scripts/lint_tokens.sh
Design-token generator from a brand colorscripts/design_token_generator.py