Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Design System

Color Palette

Based on the Kanagawa color scheme.

Core Tokens

TokenValue
--bg-primarySumi Ink 3
--bg-secondarySumi Ink 2
--bg-elevatedSumi Ink 0
--text-primaryFuji White
--text-secondaryOld White
--accent-primarySpring Blue
--accent-secondaryOni Violet

Theme Variants

  • Default (wave): Dark theme with blue/teal accents
  • Dragon: Warmer dark theme with muted greens
  • Lotus: Light theme with warm paper tones

Set the theme via data-theme attribute: data-theme="dragon" or data-theme="lotus".

Typography

Based on Bringhurst’s typographic scale (ratio 1.25).

Type Scale

TokenSize
--text-xs0.64rem
--text-sm0.8rem
--text-base1rem
--text-lg1.25rem
--text-xl1.563rem
--text-2xl1.953rem
--text-3xl2.441rem
--text-4xl3.052rem

Line Height

TokenValue
--leading-none1
--leading-tight1.25
--leading-normal1.5
--leading-loose2

Spacing

Modular spacing scale matching the type scale:

TokenSize
--space-xs0.5rem
--space-sm0.75rem
--space-md1rem
--space-lg1.25rem
--space-xl1.563rem
--space-2xl1.953rem

Usage

Apply tokens directly in CSS or SCSS:

.card {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  padding: var(--space-md);
  border: 1px solid var(--border-color);
}