Design Tokens 45 tokens
Generated reference

Design tokens from CSS source.

This reference was generated from browser-native @property rules. Inspect token values, source metadata, modes, aliases, and usage examples in one static page.

45 tokens · 1 deprecated

Tokens are grouped by category and linked from the navigation for quick scanning.

CSS-first context

The source stylesheet is available below so generated docs can be reviewed beside the actual authoring format.

Runtime-ready output

References stay as var() in CSS output, while JSON output can use resolved values for tooling.

45 / 45 tokens
2color.background2color.brand10color.primitives3color.semantic2color.text1effects4layout4radius9spacing2typography.family1typography.lineHeight5typography.size

View source stylesheet

examples/tokens.css
/* cssmark Design Tokens
 * These tokens are used by cssmark's own documentation site (dogfooding).
 */

/* ============================================================================
   Color - Primitives
   Primitive color values that semantic tokens reference via var().
   ============================================================================ */

@property --color-white {
  syntax: "<color>";
  inherits: false;
  initial-value: #ffffff;
  description: "Pure white primitive.";
  category: "color.primitives";
  type: "color";
}

@property --color-gray-50 {
  syntax: "<color>";
  inherits: false;
  initial-value: #f8f9fa;
  description: "Lightest gray for subtle backgrounds.";
  category: "color.primitives";
  type: "color";
}

@property --color-gray-500 {
  syntax: "<color>";
  inherits: false;
  initial-value: #6c757d;
  description: "Mid gray for secondary text.";
  category: "color.primitives";
  type: "color";
}

@property --color-gray-200 {
  syntax: "<color>";
  inherits: false;
  initial-value: #e9ecef;
  description: "Light gray for borders and dividers.";
  category: "color.primitives";
  type: "color";
}

@property --color-navy-900 {
  syntax: "<color>";
  inherits: false;
  initial-value: #1a1a2e;
  description: "Deep navy for primary text.";
  category: "color.primitives";
  type: "color";
}

@property --color-navy-800 {
  syntax: "<color>";
  inherits: false;
  initial-value: #2d2d44;
  description: "Dark navy for dark-mode secondary backgrounds.";
  category: "color.primitives";
  type: "color";
}

@property --color-blue-500 {
  syntax: "<color>";
  inherits: false;
  initial-value: #0055ff;
  description: "Core blue for interactive elements.";
  category: "color.primitives";
  type: "color";
}

@property --color-blue-400 {
  syntax: "<color>";
  inherits: false;
  initial-value: #66aaff;
  description: "Lighter blue for dark-mode interactive elements.";
  category: "color.primitives";
  type: "color";
}

@property --color-red-500 {
  syntax: "<color>";
  inherits: false;
  initial-value: #dc3545;
  description: "Red for error and danger states.";
  category: "color.primitives";
  type: "color";
}

@property --color-yellow-500 {
  syntax: "<color>";
  inherits: false;
  initial-value: #ffc107;
  description: "Yellow for warnings and caution states.";
  category: "color.primitives";
  type: "color";
}

/* ============================================================================
   Color - Background (semantic, references primitives)
   ============================================================================ */

@property --color-bg {
  syntax: "<color>";
  inherits: false;
  initial-value: var(--color-white);
  description: "Primary background color for the main content area.";
  category: "color.background";
  type: "color";
  mode-dark: var(--color-navy-900);
  examples: "background: var(--color-bg);";
}

@property --color-bg-secondary {
  syntax: "<color>";
  inherits: false;
  initial-value: var(--color-gray-50);
  description: "Secondary background for sidebar, code blocks, and cards.";
  category: "color.background";
  type: "color";
  mode-dark: var(--color-navy-800);
  examples: "background: var(--color-bg-secondary);";
}

/* ============================================================================
   Color - Text (semantic, references primitives)
   ============================================================================ */

@property --color-text {
  syntax: "<color>";
  inherits: false;
  initial-value: var(--color-navy-900);
  description: "Primary text color for body content.";
  category: "color.text";
  type: "color";
  mode-dark: var(--color-gray-50);
  examples: "color: var(--color-text);";
}

@property --color-text-muted {
  syntax: "<color>";
  inherits: false;
  initial-value: var(--color-gray-500);
  description: "Muted text color for secondary content, captions, and metadata.";
  category: "color.text";
  type: "color";
  examples: "color: var(--color-text-muted);";
}

/* ============================================================================
   Color - Brand (semantic, references primitives)
   ============================================================================ */

@property --color-primary {
  syntax: "<color>";
  inherits: false;
  initial-value: var(--color-blue-500);
  description: "Primary brand color for interactive elements, links, and accents.";
  category: "color.brand";
  type: "color";
  aliases: "--color-action, --color-link";
  mode-dark: var(--color-blue-400);
  examples: "color: var(--color-primary); border-color: var(--color-primary);";
}

/* ============================================================================
   Color - Semantic
   ============================================================================ */

@property --color-border {
  syntax: "<color>";
  inherits: false;
  initial-value: var(--color-gray-200);
  description: "Default border color for cards, dividers, and inputs.";
  category: "color.semantic";
  type: "color";
  mode-dark: var(--color-gray-500);
  examples: "border: 1px solid var(--color-border);";
}

@property --color-danger {
  syntax: "<color>";
  inherits: false;
  initial-value: var(--color-red-500);
  description: "Danger/error color for destructive actions and error states.";
  category: "color.semantic";
  type: "color";
  examples: "color: var(--color-danger);";
}

@property --color-warning {
  syntax: "<color>";
  inherits: false;
  initial-value: var(--color-yellow-500);
  description: "Warning color for deprecation notices and caution states.";
  category: "color.semantic";
  type: "color";
  examples: "background: var(--color-warning);";
}

/* ============================================================================
   Typography - Font Families
   ============================================================================ */

@property --font-sans {
  syntax: "*";
  inherits: true;
  initial-value: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  description: "Primary sans-serif font stack for body text and UI.";
  category: "typography.family";
  type: "font";
  examples: "font-family: var(--font-sans);";
}

@property --font-mono {
  syntax: "*";
  inherits: true;
  initial-value: ui-monospace, 'SF Mono', Monaco, 'Cascadia Code', monospace;
  description: "Monospace font stack for code, token names, and technical content.";
  category: "typography.family";
  type: "font";
  examples: "font-family: var(--font-mono);";
}

/* ============================================================================
   Typography - Font Sizes
   ============================================================================ */

@property --font-size-xs {
  syntax: "<length>";
  inherits: false;
  initial-value: 0.75rem;
  description: "Extra small text for metadata and fine print.";
  category: "typography.size";
  type: "size";
  examples: "font-size: var(--font-size-xs);";
}

@property --font-size-sm {
  syntax: "<length>";
  inherits: false;
  initial-value: 0.875rem;
  description: "Small text for descriptions and secondary content.";
  category: "typography.size";
  type: "size";
  examples: "font-size: var(--font-size-sm);";
}

@property --font-size-base {
  syntax: "<length>";
  inherits: false;
  initial-value: 1rem;
  description: "Base text size for body content.";
  category: "typography.size";
  type: "size";
  examples: "font-size: var(--font-size-base);";
}

@property --font-size-lg {
  syntax: "<length>";
  inherits: false;
  initial-value: 1.25rem;
  description: "Large text for sidebar headings.";
  category: "typography.size";
  type: "size";
  examples: "font-size: var(--font-size-lg);";
}

@property --font-size-xl {
  syntax: "<length>";
  inherits: false;
  initial-value: 1.5rem;
  description: "Extra large text for section headings.";
  category: "typography.size";
  type: "size";
  examples: "font-size: var(--font-size-xl);";
}

/* ============================================================================
   Spacing
   ============================================================================ */

@property --space-1 {
  syntax: "<length>";
  inherits: false;
  initial-value: 0.125rem;
  description: "Minimal spacing for tight padding.";
  category: "spacing";
  type: "size";
  examples: "padding: var(--space-1);";
}

@property --space-2 {
  syntax: "<length>";
  inherits: false;
  initial-value: 0.25rem;
  description: "Extra small spacing for inline elements.";
  category: "spacing";
  type: "size";
  examples: "padding: var(--space-2); margin-top: var(--space-2);";
}

@property --space-3 {
  syntax: "<length>";
  inherits: false;
  initial-value: 0.5rem;
  description: "Small spacing for compact layouts.";
  category: "spacing";
  type: "size";
  examples: "padding: var(--space-3); gap: var(--space-3);";
}

@property --space-4 {
  syntax: "<length>";
  inherits: false;
  initial-value: 0.75rem;
  description: "Medium-small spacing for card content.";
  category: "spacing";
  type: "size";
  examples: "padding: var(--space-4); margin-bottom: var(--space-4);";
}

@property --space-5 {
  syntax: "<length>";
  inherits: false;
  initial-value: 1rem;
  description: "Base spacing unit.";
  category: "spacing";
  type: "size";
  examples: "padding: var(--space-5); gap: var(--space-5);";
}

@property --space-6 {
  syntax: "<length>";
  inherits: false;
  initial-value: 1.25rem;
  description: "Medium spacing for card padding.";
  category: "spacing";
  type: "size";
  examples: "padding: var(--space-6);";
}

@property --space-7 {
  syntax: "<length>";
  inherits: false;
  initial-value: 1.5rem;
  description: "Medium-large spacing for section gaps.";
  category: "spacing";
  type: "size";
  examples: "gap: var(--space-7); margin-bottom: var(--space-7);";
}

@property --space-8 {
  syntax: "<length>";
  inherits: false;
  initial-value: 2rem;
  description: "Large spacing for major sections.";
  category: "spacing";
  type: "size";
  examples: "padding: var(--space-8); margin-bottom: var(--space-8);";
}

@property --space-9 {
  syntax: "<length>";
  inherits: false;
  initial-value: 3rem;
  description: "Extra large spacing for category separations.";
  category: "spacing";
  type: "size";
  examples: "margin-bottom: var(--space-9); padding: var(--space-9);";
}

/* ============================================================================
   Border Radius
   ============================================================================ */

@property --radius-sm {
  syntax: "<length>";
  inherits: false;
  initial-value: 2px;
  description: "Small border radius for inline code and subtle rounding.";
  category: "radius";
  type: "size";
  examples: "border-radius: var(--radius-sm);";
}

@property --radius-md {
  syntax: "<length>";
  inherits: false;
  initial-value: 4px;
  description: "Medium border radius for badges and buttons.";
  category: "radius";
  type: "size";
  examples: "border-radius: var(--radius-md);";
}

@property --radius-lg {
  syntax: "<length>";
  inherits: false;
  initial-value: 8px;
  description: "Large border radius for cards and containers.";
  category: "radius";
  type: "size";
  examples: "border-radius: var(--radius-lg);";
}

@property --radius-full {
  syntax: "<length>";
  inherits: false;
  initial-value: 999px;
  description: "Full border radius for pills and circular elements.";
  category: "radius";
  type: "size";
  examples: "border-radius: var(--radius-full);";
}

/* ============================================================================
   Effects
   ============================================================================ */

@property --shadow-sm {
  syntax: "*";
  inherits: false;
  initial-value: 0 1px 3px rgba(0,0,0,0.1);
  description: "Subtle shadow for cards and elevated elements.";
  category: "effects";
  type: "shadow";
  examples: "box-shadow: var(--shadow-sm);";
}

/* ============================================================================
   Layout
   ============================================================================ */

@property --sidebar-width {
  syntax: "<length>";
  inherits: false;
  initial-value: 280px;
  description: "Width of the sidebar navigation.";
  category: "layout";
  type: "size";
  examples: "width: var(--sidebar-width);";
}

@property --content-max-width {
  syntax: "<length>";
  inherits: false;
  initial-value: 1200px;
  description: "Maximum width of the main content area.";
  category: "layout";
  type: "size";
  examples: "max-width: var(--content-max-width);";
}

@property --card-min-width {
  syntax: "<length>";
  inherits: false;
  initial-value: 320px;
  description: "Minimum width for token cards in the grid.";
  category: "layout";
  type: "size";
  examples: "grid-template-columns: repeat(auto-fill, minmax(var(--card-min-width), 1fr));";
}

@property --swatch-size {
  syntax: "<length>";
  inherits: false;
  initial-value: 24px;
  description: "Size of color swatch indicators.";
  category: "layout";
  type: "size";
  examples: "width: var(--swatch-size); height: var(--swatch-size);";
}

/* ============================================================================
   Line Height
   ============================================================================ */

@property --line-height-base {
  syntax: "<number>";
  inherits: true;
  initial-value: 1.6;
  description: "Base line height for body text.";
  category: "typography.lineHeight";
  type: "number";
  examples: "line-height: var(--line-height-base);";
}

/* ============================================================================
   Deprecated Tokens (for demo purposes)
   ============================================================================ */

@property --color-accent {
  syntax: "<color>";
  inherits: false;
  initial-value: #6366f1;
  description: "Legacy accent color. Use --color-primary instead.";
  category: "color.brand";
  type: "color";
  deprecated: true;
  aliases: "--color-primary";
}

Using these tokens

This site is a reference for the design tokens generated from the source stylesheet. Use it to inspect available custom properties, preview their values, and copy token names into product CSS.

Install the generated variables

Import the generated CSS file once in your application or design system package:

@import "./tokens.css";

Apply tokens in components

Use token names directly with CSS custom properties. Keep semantic tokens in product code where possible.

.button {
  background: var(--color-primary);
  color: var(--color-bg);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  box-shadow: var(--shadow-sm);
}

Switch modes when available

If this token set defines modes, apply the matching attribute at the document or app shell level.

:root[data-color-mode="dark"] {
  /* Mode overrides are generated here. */
}

color.background

--color-bg #
color
#ffffff

Primary background color for the main content area.

Usage examples
  • background: var(--color-bg)
<color> ./examples/tokens.css:104
--color-bg-secondary #
color
#f8f9fa

Secondary background for sidebar, code blocks, and cards.

Usage examples
  • background: var(--color-bg-secondary)
<color> ./examples/tokens.css:115

color.brand

--color-primary #
color
#0055ff

Primary brand color for interactive elements, links, and accents.

Usage examples
  • color: var(--color-primary)
  • border-color: var(--color-primary)
Aliases: --color-action--color-link
<color> ./examples/tokens.css:155
--color-accent #
color deprecated
#6366f1

Legacy accent color. Use --color-primary instead.

Aliases: --color-primary
<color> ./examples/tokens.css:494

color.primitives

--color-white #
color
#ffffff

Pure white primitive.

<color> ./examples/tokens.css:10
--color-gray-50 #
color
#f8f9fa

Lightest gray for subtle backgrounds.

<color> ./examples/tokens.css:19
--color-gray-500 #
color
#6c757d

Mid gray for secondary text.

<color> ./examples/tokens.css:28
--color-gray-200 #
color
#e9ecef

Light gray for borders and dividers.

<color> ./examples/tokens.css:37
--color-navy-900 #
color
#1a1a2e

Deep navy for primary text.

<color> ./examples/tokens.css:46
--color-navy-800 #
color
#2d2d44

Dark navy for dark-mode secondary backgrounds.

<color> ./examples/tokens.css:55
--color-blue-500 #
color
#0055ff

Core blue for interactive elements.

<color> ./examples/tokens.css:64
--color-blue-400 #
color
#66aaff

Lighter blue for dark-mode interactive elements.

<color> ./examples/tokens.css:73
--color-red-500 #
color
#dc3545

Red for error and danger states.

<color> ./examples/tokens.css:82
--color-yellow-500 #
color
#ffc107

Yellow for warnings and caution states.

<color> ./examples/tokens.css:91

color.semantic

--color-border #
color
#e9ecef

Default border color for cards, dividers, and inputs.

Usage examples
  • border: 1px solid var(--color-border)
<color> ./examples/tokens.css:171
--color-danger #
color
#dc3545

Danger/error color for destructive actions and error states.

Usage examples
  • color: var(--color-danger)
<color> ./examples/tokens.css:182
--color-warning #
color
#ffc107

Warning color for deprecation notices and caution states.

Usage examples
  • background: var(--color-warning)
<color> ./examples/tokens.css:192

color.text

--color-text #
color
#1a1a2e

Primary text color for body content.

Usage examples
  • color: var(--color-text)
<color> ./examples/tokens.css:130
--color-text-muted #
color
#6c757d

Muted text color for secondary content, captions, and metadata.

Usage examples
  • color: var(--color-text-muted)
<color> ./examples/tokens.css:141

effects

--shadow-sm #
shadow

Subtle shadow for cards and elevated elements.

Usage examples
  • box-shadow: var(--shadow-sm)
* ./examples/tokens.css:422

layout

--sidebar-width #
size
280px

Width of the sidebar navigation.

Usage examples
  • width: var(--sidebar-width)
<length> ./examples/tokens.css:436
--content-max-width #
size
1200px

Maximum width of the main content area.

Usage examples
  • max-width: var(--content-max-width)
<length> ./examples/tokens.css:446
--card-min-width #
size
320px

Minimum width for token cards in the grid.

Usage examples
  • grid-template-columns: repeat(auto-fill, minmax(var(--card-min-width), 1fr))
<length> ./examples/tokens.css:456
--swatch-size #
size
24px

Size of color swatch indicators.

Usage examples
  • width: var(--swatch-size)
  • height: var(--swatch-size)
<length> ./examples/tokens.css:466

radius

--radius-sm #
size
2px

Small border radius for inline code and subtle rounding.

Usage examples
  • border-radius: var(--radius-sm)
<length> ./examples/tokens.css:378
--radius-md #
size
4px

Medium border radius for badges and buttons.

Usage examples
  • border-radius: var(--radius-md)
<length> ./examples/tokens.css:388
--radius-lg #
size
8px

Large border radius for cards and containers.

Usage examples
  • border-radius: var(--radius-lg)
<length> ./examples/tokens.css:398
--radius-full #
size
999px

Full border radius for pills and circular elements.

Usage examples
  • border-radius: var(--radius-full)
<length> ./examples/tokens.css:408

spacing

--space-1 #
size
0.125rem

Minimal spacing for tight padding.

Usage examples
  • padding: var(--space-1)
<length> ./examples/tokens.css:284
--space-2 #
size
0.25rem

Extra small spacing for inline elements.

Usage examples
  • padding: var(--space-2)
  • margin-top: var(--space-2)
<length> ./examples/tokens.css:294
--space-3 #
size
0.5rem

Small spacing for compact layouts.

Usage examples
  • padding: var(--space-3)
  • gap: var(--space-3)
<length> ./examples/tokens.css:304
--space-4 #
size
0.75rem

Medium-small spacing for card content.

Usage examples
  • padding: var(--space-4)
  • margin-bottom: var(--space-4)
<length> ./examples/tokens.css:314
--space-5 #
size
1rem

Base spacing unit.

Usage examples
  • padding: var(--space-5)
  • gap: var(--space-5)
<length> ./examples/tokens.css:324
--space-6 #
size
1.25rem

Medium spacing for card padding.

Usage examples
  • padding: var(--space-6)
<length> ./examples/tokens.css:334
--space-7 #
size
1.5rem

Medium-large spacing for section gaps.

Usage examples
  • gap: var(--space-7)
  • margin-bottom: var(--space-7)
<length> ./examples/tokens.css:344
--space-8 #
size
2rem

Large spacing for major sections.

Usage examples
  • padding: var(--space-8)
  • margin-bottom: var(--space-8)
<length> ./examples/tokens.css:354
--space-9 #
size
3rem

Extra large spacing for category separations.

Usage examples
  • margin-bottom: var(--space-9)
  • padding: var(--space-9)
<length> ./examples/tokens.css:364

typography.family

--font-sans #
font
Aa Bb Cc 123 The quick brown fox jumps over the lazy dog

Primary sans-serif font stack for body text and UI.

Usage examples
  • font-family: var(--font-sans)
* ./examples/tokens.css:206
--font-mono #
font
Aa Bb Cc 123 The quick brown fox jumps over the lazy dog

Monospace font stack for code, token names, and technical content.

Usage examples
  • font-family: var(--font-mono)
* ./examples/tokens.css:216

typography.lineHeight

--line-height-base #
number
1.6

Base line height for body text.

Usage examples
  • line-height: var(--line-height-base)
<number> ./examples/tokens.css:480

typography.size

--font-size-xs #
size
Aa 0.75rem

Extra small text for metadata and fine print.

Usage examples
  • font-size: var(--font-size-xs)
<length> ./examples/tokens.css:230
--font-size-sm #
size
Aa 0.875rem

Small text for descriptions and secondary content.

Usage examples
  • font-size: var(--font-size-sm)
<length> ./examples/tokens.css:240
--font-size-base #
size
Aa 1rem

Base text size for body content.

Usage examples
  • font-size: var(--font-size-base)
<length> ./examples/tokens.css:250
--font-size-lg #
size
Aa 1.25rem

Large text for sidebar headings.

Usage examples
  • font-size: var(--font-size-lg)
<length> ./examples/tokens.css:260
--font-size-xl #
size
Aa 1.5rem

Extra large text for section headings.

Usage examples
  • font-size: var(--font-size-xl)
<length> ./examples/tokens.css:270
Generated by cssmark View on GitHub