The Craftsman — Design Systems, OKLCH & The Living Workshop
The master design system blueprint for Swiss typography, OKLCH color spaces, accessible UI primitives, and real-time in-browser manipulation.
Standard rejects the trial-and-error approach of modern web styling. There are no arbitrary margins, no guessing padding values, and no eyeballed color contrasts.
Instead, Standard operates as an optical and mathematical instrument. Every dimension, typeface hierarchy, and chromatic ramp derives from three foundational constants:
- The Silver Ratio (1.414) for typographic scale and modular bounding boxes.
- The Root Line Height (1rlh) for vertical rhythm and proportional spacing.
- The Perceptually Uniform OKLCH Color Space for guaranteed AAA contrast across 34 themes.
Coupled with the in-browser Workshop drawer (]), Standard transforms interface design into a living, tactile craft.
1. The Optical Manifesto
flowchart LR
A["1. Silver Ratio (1.414)<br/>Modular Type Scale"] --> B["2. Root Line Height (1rlh)<br/>Vertical Rhythm Cadence"] --> C["3. OKLCH Perceptual Space<br/>Guaranteed AAA Contrast"]
- No Eyeballed Dimensions: Every spacing token derives mathematically from a single root line-height unit (
1rlh). Spacing scales up and down in harmonic musical increments. - Perceptual Uniformity: In OKLCH, a chroma value of
0.18has the exact same visual intensity regardless of whether the hue is electric blue or warm ochre. Dark mode is derived mathematically, never hand-patched. - The Living Document: The design system documents itself live from the active stylesheet. Pressing ] opens the Workshop, allowing you to tweak tokens and watch components re-render instantaneously.
2. The Living Atelier: The In-Browser Workshop (])
Open the Live Design Workshop
You can test this right now without leaving this page. Click below or press the ] key on your keyboard to slide out the live token editor, swap color themes, and inspect the 1rlh baseline grid in real-time.
Standard features a built-in, zero-dependency design environment directly inside the running application. You never have to leave the browser or recompile CSS to audit layout changes:
[ (hold) # Workshop: inspect page without local changes
] # Workshop: toggle drawer (open, pin, close)
Shift + Cmd/Ctrl + D # Toggle debug mode (baseline grid & rhythm overlay)
ESC # Close active drawer or modal
Real-Time In-Browser Levers
With the Workshop drawer pinned (]), you can:
- Hot-swap Themes: Cycle instantly through all 34 native OKLCH themes.
- Tune Spacing Harmonics: Adjust the root line-height multiplier (
--space) and observe cards, grids, and typography snap to the new vertical rhythm. - Inspect Optical Grids: Turn on the baseline grid overlay to audit alignment against the 1rlh rhythmic cadence.
3. The 35 Semantic Primitives (@stnd/ui) & 6 Layouts (@stnd/layout)
Standard prioritizes a Vanilla-First hierarchy: 90% of interfaces can be constructed using semantic HTML tags (<button>, <dialog>, <table>, <input>) pre-styled with OKLCH tokens.
For complex interactive behaviors, Standard ships 35 accessible Svelte 5 and Astro primitives:
| Category | Primitives | Role |
|---|---|---|
| Overlays & Modals | <Dialog />, <AlertDialog />, <Popover />, <ContextMenu />, <Dropdown /> |
Accessible floating surfaces with focus trapping and ESC bindings |
| Data & Structure | <DataTable />, <Stat />, <Empty />, <Tabs />, <Accordion />, <Tree /> |
High-density information display adapting to active theme roles |
| Inputs & Controls | <Combobox />, <OtpInput />, <Pagination />, <Toast /> |
Keyboard-first form elements and transient feedback banners |
| Navigation & Shell | <Header />, <Footer />, <Breadcrumb />, <TableOfContents /> |
Structural framing for editorial and application pages |
The 6 Layout Shells (@stnd/layout)
Base: The foundational HTML5 shell with CSS token injection and theme hydration.Window: Application workspace shell with titlebars and docked rails.Panel: Collapsible sidebar layout with localStorage state preservation.Encrypted: Password-protected vault view for private content notes.Meta: Technical diagnostics and system telemetry dashboard.StndInit: Minimal bootstrapper for embedded micro-apps.
4. Swiss 12-Column Grid & Spatial Rhythm
Layouts in Standard consume Josef Müller-Brockmann’s 12-column Swiss proportional grid. Space is organized horizontally into 12 equal tracks, combined with .gap-* rhythmic units:
<div class="grid gap-2">
<main class="col-8 sm:col-12">Primary Content (66%)</main>
<aside class="col-4 sm:col-12">Contextual Sidebar (33%)</aside>
</div>
Classic Swiss Proportions
col-6+col-6: Symmetrical halves (50% / 50%)col-8+col-4: Asymmetric reading column and sidebar (66% / 33%)col-4× 3: Three-column triptych card gallery (33% each)col-3× 4: Four-column metric telemetry bento grid (25% each)
The Inviolable Spacing Rule
Always apply
gapon the parent container (.flexor.grid), nevermarginon child elements. Margins on children create asymmetric edge spacing that breaks outer container boundaries.
5. The Interactive Studio (/studio)
The Studio is Standard’s dedicated design engineering laboratory, accessible at /studio:
- Typography Ladder: Inspect font sizes from
3xsto6xllive, measured directly from the browser’s computed layout engine. - Chromatic Chips & Contrast Matrix: Audit AAA contrast ratios across all 34 OKLCH palettes in both light and dark modes.
- Spacing Bar Visualizer: Inspect baseline rhythm increments from
--space-d4up to--space-6.
6. Where to Go Next
- Design Principles: Deep dive into the 7 Golden Tokens and modular mathematics.
- Live CSS Stylesheets: Exhaustive catalog of all 27 compiled stylesheets.
- Vanilla-First UI Patterns: Copy-paste HTML patterns for cards, switches, toolbars, and bento grids.
- Interactive Studio: Launch the full-screen visual inspection laboratory.