Design System

Color, typography, and component conventions for Space.

Design
Created Updated

Color

The 500 step keeps #00ABD6 and #FF9A57. Orange interpolates by lightness while its OKLCH hue shifts from 62° down to 38°, moving from amber toward reddish orange. HEX values are sRGB approximations; HSB is shown for reference only and is not used for derivation.

Cyan · OKLCH 224

50
100
300
500
700
900
Step HEX (approx.) HSB OKLCH
50 #e8f8ff 198 / 9 / 100 0.970 / 0.019 / 224
100 #c9efff 198 / 21 / 100 0.930 / 0.045 / 224
300 #80dcfe 196 / 50 / 100 0.850 / 0.100 / 224
500 #00abd6 192 / 100 / 84 0.689 / 0.129 / 224
700 #0f7d9d 194 / 90 / 62 0.550 / 0.100 / 224
900 #034a5e 193 / 97 / 37 0.380 / 0.070 / 224

Orange

50
100
300
500
700
900
Step HEX (approx.) HSB OKLCH
50 #fdf3ea 28 / 8 / 99 0.970 / 0.016 / 62
100 #fde2ce 26 / 19 / 99 0.930 / 0.040 / 59
300 #fcbf94 25 / 41 / 99 0.850 / 0.090 / 56
500 #ff9a57 24 / 66 / 100 0.779 / 0.146 / 52
700 #bc4602 22 / 99 / 74 0.551 / 0.165 / 42
900 #742304 17 / 97 / 46 0.380 / 0.120 / 38

HSB lists hue, saturation, and brightness; OKLCH lists perceptual lightness, chroma, and hue.

  • --color-surface: page background.
  • --color-surface-raised: cards and controls.
  • --color-text, --color-text-muted: body and secondary text.
  • --color-border: hairlines.

Typography

Serif: reading and narrative.
Sans-serif: UI labels and metadata.
Monospace: code and data.

Lead paragraphs use a larger size and a quieter text color.

Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6

Body text uses weight 500; headings and emphasis use 600–700. Buttons, badges, highlights, and form controls inherit their container’s font. Inline elements include links, bold, italic, inline code, and ⌘ K.

Lists

  • Keep unordered lists simple.
  • Use indentation rather than decoration for hierarchy.
    • Nested items share the same style.
    • Long content wraps naturally.
  1. Ordered lists are for steps.
  2. Keep each step to a single action.
  3. Put explanations after the steps when needed.

Blockquotes

Use blockquotes for citations or a brief aside.

Skip decorative filler.

Code

Inline code is for commands, fields, and short identifiers. Code blocks are for complete examples.

TypeScript
type Note = {
  title: string;
  tags: string[];
  publishedAt?: Date;
};

// Format title, publish date, and tags.
export function formatNote(note: Note): string {
  const date = note.publishedAt?.toLocaleDateString("en-US", {
    year: "numeric",
    month: "long",
    day: "numeric",
  });
  const tags = note.tags.map((tag) => `#${tag}`).join(" ");

  if (!tags) return `${note.title} · ${date ?? "Unpublished"}`;

  return `${note.title} · ${date ?? "Draft"} · ${tags}`;
}

console.log(formatNote({ title: "Design System", tags: ["design", "typescript"] }));

Math

Inline math: a2+b2=c2a^2 + b^2 = c^2.

Display math:

Attention⁡(Q,K,V)=softmax⁡(QK⊤dk)V\operatorname{Attention}(Q, K, V) = \operatorname{softmax}\left(\frac{QK^{\top}}{\sqrt{d_k}}\right)V

Diagrams

Mermaid diagrams are capped at 36rem tall. Images and Mermaid diagrams open on click, support pinch-to-zoom and panning, and close with Esc.

Mermaid

flowchart TD
  A[Request] --> B{New component?}
  B -->|Yes| C[Define API]
  B -->|No| D[Reuse existing]
  C --> E[Implement]
  D --> E
  E --> F[Review]
  F --> G{Passes?}
  G -->|No| C
  G -->|Yes| H[Integrate]
  H --> I[Ship]
  I --> J[Document usage]

  subgraph Design[Design]
    B
    C
    D
  end

  subgraph Verify[Verify]
    E
    F
    G
  end

Images

Saturn
Saturn

The Gallery presents photos in a ratio-preserving masonry grid. Cards load the mid derivative from ZenGallery, and PhotoSwipe loads the high version on click. On wide landscape screens the info panel opens as a right rail; on smaller or portrait screens it rises from the bottom while the photo and controls shift up and scale down together, keeping the backdrop full-bleed, with a drag handle to dismiss. The backdrop uses a cross-faded blur of the current photo, and controls and bottom-left captions hide when idle. The panel shows title, location, coordinates, altitude, capture time, camera settings, and plain-text tags.

Each photo entry keeps only filename, title, description, capturedAt, location, exif, tags, and optional dimensions, file size, and format. description supports [label](url) inline links.

Gallery styles live in src/styles/gallery.css and load only on the Gallery page, reusing global design tokens.

Gallery and note images share src/lib/image-viewer.ts and src/styles/image-viewer.css for open/close animations, zoom controls, and idle hiding. The Gallery info panel and note Mermaid conversion are handled by their own entry points.

Footprints

The Footprints page uses a full-width globe layout with the same navigation and typography as the rest of the site. Colors come directly from global semantic tokens: cyan for actions and active states, orange for footprint dots. Map status, retry, and controls reuse .btn / .btn-ghost; page CSS only handles layout and sizing without defining a separate theme or overriding the header.

Ocean and border colors are mixed from existing tokens, converted to sRGB for WebGL in the browser, and updated when the theme changes.

Tables

Element Usage
Primary Links, current state, primary actions
Orange Key actions, highlights
Neutral Body text, hairlines, backgrounds

Buttons

Use one primary button per view. Reserve orange for a few key actions.

HTML
<button class="btn btn-primary">Primary</button>
<button class="btn btn-ghost">Cancel</button>
<button class="btn btn-ghost btn-icon size-10" aria-label="Menu">☰</button>

Badges

Show status, not decoration.

Draft Current Watching Done Failed
HTML
<span class="badge">Draft</span>
<span class="badge badge-primary">Current</span>
<span class="badge badge-accent">Watching</span>
<span class="badge badge-success">Done</span>
<span class="badge badge-danger">Failed</span>

Highlights

If a note fits naturally in the prose, skip the highlight.

Note
Context that helps the reader follow along.
Attention
Use only when a warning is warranted.
HTML
<div class="highlight">
  <span class="highlight-icon" aria-hidden="true">💡</span>
  <div>
    <div class="highlight-title">Note</div>
    Context that helps the reader follow along.
  </div>
</div>

Forms

Use native controls. Styles only unify surface, focus, and spacing.

HTML
<input class="field" type="text" placeholder="Single-line input" />

<label class="choice">
  <input type="checkbox" checked />
  Remember choice
</label>

Disclosure

Use native <details>—no script required.

When should I use a disclosure?
When content is secondary but worth keeping.
Should primary content be collapsed?
Keep primary content directly in the prose.
HTML
<details class="accordion">
  <summary>When should I use a disclosure?</summary>
  <div class="accordion-body">When content is secondary but worth keeping.</div>
</details>

UI Components

Time

Server-rendered first, then updated to the visitor’s local time zone in the browser:

Use <Time date={date} /> everywhere; pass format="datetime" when hours and minutes are needed.

Drawer

Drawer

Supports Escape, backdrop click, and focus trapping.

Jump and close

Use <Drawer> in code. The left sidebar on this page is the <NoteTree> index, and the theme toggle is in the top-left header.

List Hover

Add .hover-pop: transparent by default, fading in a --color-list-hover tint with a gentle spring (320ms) on hover or focus, without changing the text color.

Scope

Scope Contents
Global Colors, heading-1, heading-2, .page-intro, .hover-pop, buttons, badges, highlights, forms, disclosures, code & media styles, Time, Drawer
Gallery page Masonry grid, viewer, photo info panel
Markdown prose .prose lists, blockquotes, inline code, copy buttons, and media preview setup
This page’s demos .demo-*, .ramp*, .demo-dialog

Maintenance

Prefer CSS and native elements first; add scripts only when needed. When changing a component, check dark mode, keyboard access, and mobile layouts.

Back to notes