Smart kettle

Smart kettle

Theme

The colours and type these docs are drawn in, from expectation_theme. Night is an instrument panel: near-black screens in olive bezels, phosphor-green for what passed, amber cautions and red failures. Day is the same panel in sunlight, and these docs use it in a light browser. Colours are roles, so what each one is for is the same in both.

Components

Night · Buttons
CHECKRUNRETRY 2DISCARD
Lamps
PASSDOCSSLOWFAILSKIP
Messages
12:04:31 Suite loaded: 42 expectations
All stories passed
2 tests not supported yet
1 test failed
Results saved to docs/results
Next: generated tests
In the docs
verifiednot supported yetfailednot run
Given the tool is PEN
When the user clicks the canvas
Then the drawing goes up by 1
Day · Buttons
CHECKRUNRETRY 2DISCARD
Lamps
PASSDOCSSLOWFAILSKIP
Messages
12:04:31 Suite loaded: 42 expectations
All stories passed
2 tests not supported yet
1 test failed
Results saved to docs/results
Next: generated tests
In the docs
verifiednot supported yetfailednot run
Given the tool is PEN
When the user clicks the canvas
Then the drawing goes up by 1

Night palette

canvas#1a1b17 · 1.2:1 on screen
bezel#2b2d26 · 1.4:1 on screen
bezel-edge#45483d · 2.2:1 on screen
title#22241e · 1.3:1 on screen
screen#050806 · 1.0:1 on screen
map#0b100c · 1.0:1 on screen
text#dfe8df · 16.0:1 on screen
muted#919c91 · 7.1:1 on screen
faint#3a403a · 1.9:1 on screen
ok#4cff7a · 15.2:1 on screen
ok-dim#2a9447 · 5.2:1 on screen
caution#ffb21f · 11.2:1 on screen
warning#ff5a4f · 6.5:1 on screen
info#45d4ff · 11.6:1 on screen
highlight#ff5ce1 · 7.5:1 on screen
marker#ffe14d · 15.5:1 on screen
control#161a16 · 1.1:1 on screen
control-hover#2a302a · 1.5:1 on screen
ok-fill#14361f · 1.5:1 on screen
caution-fill#3a2c08 · 1.5:1 on screen
warning-fill#4a0f0c · 1.3:1 on screen
on-warning#ffd0cc · 14.5:1 on screen
off-fill#0c0f0c · 1.0:1 on screen
off-edge#1e221e · 1.2:1 on screen
lamp-ok#0c1f12 · 1.2:1 on screen
lamp-warning#5a0d0a · 1.4:1 on screen

Day palette

canvas#ebe8dd · 1.2:1 on screen
bezel#f6f4ed · 1.1:1 on screen
bezel-edge#cfcab6 · 1.6:1 on screen
title#e2dfd0 · 1.3:1 on screen
screen#fbfaf6 · 1.0:1 on screen
map#eef0e6 · 1.1:1 on screen
text#1a1b17 · 16.6:1 on screen
muted#545a4f · 6.8:1 on screen
faint#a6aa9a · 2.3:1 on screen
ok#136a32 · 6.4:1 on screen
ok-dim#5a9a6a · 3.2:1 on screen
caution#7a4c00 · 7.0:1 on screen
warning#a82219 · 6.9:1 on screen
info#085d7b · 7.0:1 on screen
highlight#8c267e · 7.5:1 on screen
marker#8a6d00 · 4.7:1 on screen
control#f1efe7 · 1.1:1 on screen
control-hover#e4e1d3 · 1.3:1 on screen
ok-fill#dcefe0 · 1.2:1 on screen
caution-fill#f5e5c2 · 1.2:1 on screen
warning-fill#f7dad6 · 1.3:1 on screen
on-warning#7a120c · 10.5:1 on screen
off-fill#eceae1 · 1.2:1 on screen
off-edge#d8d4c4 · 1.4:1 on screen
lamp-ok#e3f2e6 · 1.1:1 on screen
lamp-warning#f3cfca · 1.4:1 on screen

Type and shape

Labels, headings, codeMenlo, ui-monospace, "SF Mono", "Fira Mono", Consolas, monospace
Prose in the docssystem-ui, -apple-system, "Segoe UI", Roboto, sans-serif
Cornerswindow 17 · panel 11 · screen 6 · control 4 (each inset steps the radius down by the inset)
Spacinggap 6 · bezel padding 5

Every ink reads at 4.5:1 or better on every surface it sits on, in both variants. The theme's tests check it.

Your own theme

Give expectation docs or expectation-run a CSS file with --stylesheet, or put one called theme.css in the suite's directory. It is copied to site/assets/custom.css and loaded by every page, in every platform's manual, after the built-in styles. Results, screenshots and links are not touched, so a site can be restyled from saved results without running the tests again.

Colour tokens: --canvas, --bezel, --bezel-edge, --title, --screen, --map, --text, --muted, --faint, --ok, --ok-dim, --caution, --warning, --info, --highlight, --marker, --control, --control-hover, --ok-fill, --caution-fill, --warning-fill, --on-warning, --off-fill, --off-edge, --lamp-ok, --lamp-warning. Shape and type tokens: --font-mono, --font-sans, --radius-window, --radius-panel, --radius-screen, --radius-control, --gap, --bezel-pad. Each colour is a role: what it is for is the same in Day and Night.

The built-in dark rule is more specific than a plain :root, so to change a token in both modes set it for each:

:root, :root[data-theme="day"] { --canvas: #fffdf7; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="day"]) { --canvas: #14110b; }
}
:root[data-theme="night"] { --canvas: #14110b; }

Leave the dark rules out and a reader who prefers dark keeps the built-in Night value of that token. Beyond tokens, any component's CSS can be overridden by selector; the HTML is the same.

The file is copied as it is, so a relative url(...) in it is looked up beside site/assets/custom.css, not beside the file you gave. Keep the site self-contained and usable offline: inline images and fonts as data: URLs, or ship the files into site/assets/ yourself. An @import or font from another host needs the network.

Accessibility

Keep text at 4.5:1 or better against the surface it sits on (3:1 for large text and for borders and lamps that carry meaning), in each mode you define. The built-in theme meets it. Never rely on colour alone to tell results apart: each verdict is also named in words (verified, failed, not supported yet), and a custom theme should leave that text visible. Theming changes how pages look, not what they say or what passed.