Kayavak / About / Design system
About
The design system
Every page is built from one stylesheet and one script. This page is generated from them, so it can't drift: the colour
tokens below are read from library.css with their contrast measured in each theme, the icons from icons.svg, and
the components are the real ones. New shelves use these and nothing else.
Principles
- Reading first. Running text in a highly legible face at a comfortable measure; everything else gets out of its way.
- Tokens, not values. Colours, fonts, sizes and spacing come from custom properties, so the three themes and the reader's settings change everything at once.
- Contrast in every theme. Text colours meet WCAG AA (4.5:1) against their background in light, sepia and dark; the check runs on every batch.
- Meaning before decoration. Native elements first, icons only beside words, colour never the only signal, motion only when it explains.
- Nothing from elsewhere. Fonts, icons and scripts are served from this site.
Colour
Text tokens show their contrast against the page (syntax colours against code blocks).
| Token | Light | Sepia | Dark |
|---|---|---|---|
--paper | #f6f4ef | #f1e8d6 | #151513 |
--panel | #fcfbf8 | #f7f0e2 | #1c1c19 |
--sunk | #efece5 | #e9dec8 | #232320 |
--ink | #23221f 14.5:1 | #3a2f22 10.7:1 | #e9e5dc 14.5:1 |
--muted | #67635b 5.4:1 | #6e5e4a 5.1:1 | #aaa497 7.4:1 |
--faint | #6e695f 5.0:1 | #705f49 5.0:1 | #908b80 5.4:1 |
--rule | #e2ddd3 | #ddcfb6 | #2f2e2a |
--accent | #2f43c9 6.9:1 | #2f43c9 6.2:1 | #93a2ff 7.7:1 |
--accent-soft | #e7eafb | #e7eafb | #1c2246 |
--done | #29774c 5.0:1 | #25703f 5.0:1 | #6fcf9a 9.6:1 |
--done-soft | #e2f1e7 | #e3ead2 | #15301f |
--warn | #a3501d 5.1:1 | #9c4916 5.1:1 | #f0a26b 8.8:1 |
--warn-soft | #f8ebe0 | #f3e1cc | #3a2415 |
--code-bg | #efece5 | #eadfc9 | #20201d |
--s-kw | #8a2a9c 6.2:1 | #8a2a9c 5.5:1 | #d59bf0 7.6:1 |
--s-ty | #1d63a8 5.2:1 | #1d63a8 4.7:1 | #7cb8f2 7.8:1 |
--s-str | #2a782a 4.7:1 | #227022 4.7:1 | #a3d68f 9.8:1 |
--s-com | #6e695f 4.6:1 | #6e5f49 4.7:1 | #908b80 4.8:1 |
--s-num | #ae4c17 4.6:1 | #a5430e 4.7:1 | #f0a46b 8.0:1 |
--s-fn | #2f43c9 6.4:1 | #2f43c9 5.7:1 | #a9b5ff 8.4:1 |
--s-pp | #906000 4.6:1 | #875700 4.7:1 | #e3c06b 9.3:1 |
Type
Running text uses --read ("Atkinson Hyperlegible Next"): designed for legibility, with distinct letterforms.
Headings, labels, navigation and code use --font ("k3nme Rounded"), self-hosted.
Body size is --fs (18px, changed by the reader's size setting), measure --measure (66ch),
line height --leading (1.68).
Icons
45 icons, drawn on a 24-pixel grid with 1.8-pixel strokes in the current text colour. Always beside a word or with a label.
settingshomeshelvestrailsconceptsworkbenchrecapsdesksearchmenuinfoshieldpencilsparkfeedglobeprofilecodebranchlicencetargetcompassbuildbulbalertlayersnoterulerule-oncheckglossaryhashflaskbriefcaseflagplusstackarrow-rarrow-lclockshareplaycpuscroll-upsettings
Buttons and controls
~25 min 12 topics A plain chip
Callouts
Each kind has its icon, added by the script. Callouts are notes, not landmarks.
Code
def total(qty):
return sum(qty)Folded answers
Reason it through, then open
Answers, hints, solutions and what-if reasoning are folded, so readers think first.
Comparison tables
| Aspect | Option A | Option B |
|---|---|---|
| Use when | … | … |
Derivations
A result rebuilt from first principles: numbered steps in prose, each step's reasoning folded so the reader tries it first. Used in every Deeper page's "Derive it" section (gathered at Derivations).
- State what is known and what is wanted.
- Take one step that follows from the last.
Why that step holds
The justification, in one or two sentences.
- Check the result against a case you can work by hand.
Maths and plots
Write LaTeX between \( \) inline or \[ \] on its own line; it becomes MathML when the page is built,
so it needs no script and screen readers read it. Little's law: . A geometric series:
A :::plot block draws a formula as SVG at its default parameters and, in the browser, adds a slider for each one
(tools/mathplot.py, assets/plot.js). Formulas are parsed by a small grammar, never run as code.
What-if calculators
A model with its parameters as sliders and number inputs side by side, the result in words and a chart drawn as SVG that
redraws as the numbers change. Each calculator states its formula and its limits. See the
calculators; new ones are added to assets/whatif.js.
Graphs
Relationships drawn as SVG with a text alternative beside them: every node is a button or link, and the same facts are listed in words. See the map.