--- name: create-style-guide description: Generate comprehensive style guide documentation from theme and design tokens. Outputs to markdown, HTML, or Figma tokens. argument-hint: "[--format markdown|html|figma-tokens] [--include colors|typography|spacing|all]" allowed-tools: Read, Glob, Grep, Task, Skill --- # Create Style Guide Command Generate comprehensive style guide documentation from design tokens and theme configuration. ## Usage ```bash /cms:create-style-guide --format markdown /cms:create-style-guide --format html --include all /cms:create-style-guide --format figma-tokens ``` ## Format Options - **markdown**: Markdown documentation - **html**: Interactive HTML style guide - **figma-tokens**: Figma Tokens plugin format ## Workflow ### Step 1: Parse Arguments Extract format and include options from command. ### Step 2: Load Design Tokens Read existing design tokens from: - Token JSON files - CSS variable definitions - Theme configuration ### Step 3: Invoke Skills Invoke relevant skills: - `design-token-management` - Token analysis - `multi-site-theming` - Theme variations ### Step 4: Generate Markdown Style Guide ```markdown # Design System Style Guide ## Table of Contents 1. [Brand Overview](#brand-overview) 2. [Colors](#colors) 3. [Typography](#typography) 4. [Spacing](#spacing) 5. [Components](#components) 6. [Icons](#icons) 7. [Usage Guidelines](#usage-guidelines) --- ## Brand Overview ### Brand Values - **Professional**: Clean, trustworthy, reliable - **Modern**: Contemporary, innovative, forward-thinking - **Accessible**: Inclusive, clear, easy to use ### Voice & Tone - Clear and concise - Friendly but professional - Action-oriented --- ## Colors ### Primary Colors | Name | Hex | RGB | CSS Variable | |------|-----|-----|--------------| | Brand Primary | #2563eb | rgb(37, 99, 235) | `--color-brand-primary` | | Brand Dark | #1e40af | rgb(30, 64, 175) | `--color-brand-dark` | | Brand Light | #93c5fd | rgb(147, 197, 253) | `--color-brand-light` | ### Neutral Colors | Name | Hex | Usage | |------|-----|-------| | Gray 50 | #f9fafb | Backgrounds | | Gray 100 | #f3f4f6 | Subtle backgrounds | | Gray 500 | #6b7280 | Secondary text | | Gray 900 | #111827 | Primary text | ### Semantic Colors | Name | Color | Usage | |------|-------|-------| | Success | #22c55e | Confirmations, positive states | | Warning | #f59e0b | Cautions, important notices | | Error | #ef4444 | Errors, destructive actions | | Info | #3b82f6 | Informational messages | ### Color Usage Guidelines **Do:** - Use brand primary for CTAs and key actions - Use semantic colors consistently for their intended purpose - Ensure 4.5:1 contrast ratio for text **Don't:** - Use brand colors for error states - Mix semantic colors outside their purpose - Use low-contrast color combinations --- ## Typography ### Font Families | Purpose | Font | Fallback | |---------|------|----------| | Headings | Inter | system-ui, sans-serif | | Body | Inter | system-ui, sans-serif | | Code | JetBrains Mono | monospace | ### Type Scale | Name | Size | Line Height | Usage | |------|------|-------------|-------| | Display | 3.815rem | 1.1 | Hero headlines | | H1 | 3.052rem | 1.2 | Page titles | | H2 | 2.441rem | 1.2 | Section titles | | H3 | 1.953rem | 1.3 | Subsections | | H4 | 1.563rem | 1.3 | Card titles | | Body | 1rem | 1.6 | Paragraph text | | Small | 0.8rem | 1.5 | Captions, labels | ### Text Styles #### Headings ```html
Regular paragraph text
Introductory paragraph with emphasis
Caption or helper text
``` --- ## Spacing ### Spacing Scale | Token | Value | Usage | |-------|-------|-------| | space-1 | 0.25rem | Tight padding | | space-2 | 0.5rem | Element padding | | space-4 | 1rem | Component padding | | space-8 | 2rem | Section gaps | | space-16 | 4rem | Large gaps | ### Layout Guidelines - Use `space-4` for standard component padding - Use `space-8` between related sections - Use `space-16` between major page sections --- ## Components ### Buttons #### Primary Button ```html ``` - Use for main CTA - One primary button per section #### Secondary Button ```html ``` - Use for alternative actions - Can pair with primary button #### Button States | State | Description | |-------|-------------| | Default | Normal resting state | | Hover | Darkened background | | Active | Further darkened | | Disabled | 50% opacity, no pointer | ### Cards ```htmlDescription