Skip to content
Inside a Developer's Head by Jesús Quintana, home

side project

Leer en español

Tide Pool

LiveStarted 2026

The design system behind this site and 29N: tokens, fonts, light and dark themes and a few shared components.

What it is

Tide Pool is the design system behind this site and 29N: colour tokens, self-hosted fonts, light and dark themes and a few shared Astro components for the page shell. Both sites use it straight from source in the monorepo, so they share one look.

It ships almost no JavaScript, just the inline theme scripts and the header’s Menu button, and the pages work with JavaScript off.

How it's built

Tide Pool is the design system behind this site and the 29N guide: a private library in the monorepo, used straight from source. It has colour tokens with a light and a dark theme, self-hosted trimmed fonts, a small theme switcher and the page shell (layout, header, footer). Almost every rule in it is enforced by a test, so the system can’t drift without a red build.

highlights

  • One source of truth for colour

    Colours live in one CSS file. A few places can’t read CSS variables (the share image, the web manifest, app icons), so a TypeScript palette mirrors the light values as hex. A test parses the CSS and fails if the two disagree, if the palette points at a variable that doesn’t exist, or if a hex colour appears anywhere else; sites run the same scan on their own code.

  • Contrast computed in the tests, in both themes

    The tests have their own WCAG luminance and contrast functions and a list of every text-on-background pair the design uses. Each pair must reach 4.5:1 in light and in dark, and the focus ring 3:1 on paper and cards. Tokens that point at other tokens are resolved first, so the test checks the real colour.

  • Dark mode in pure CSS, with a test for the duplicate

    The dark theme only redeclares the tokens that change, so components never know which theme is on. It follows the system setting unless the reader picks one, which needs the same block twice, so a test checks the two are identical, that every dark token has a light one, and that the bright coral and tangerine fills stay the same. Print is always light.

  • Theme scripts as serialised functions

    The reader’s choice is stored in the browser, and the page works without JavaScript. To avoid a flash of the wrong theme, a blocking inline script sets the theme before first paint. These scripts are normal TypeScript functions turned into inline strings with Function#toString, so they are unit-tested as code but ship as tiny scripts, and blocked storage just means the choice lasts for the page view.

  • Fonts trimmed by a script, and tests that keep them in step

    The font files are Latin subsets cut down by a Python script with fontTools: variable fonts are pinned to the weights I use and unused OpenType features are dropped. The output is committed, so CI needs no Python. A test checks the script’s weights against each @font-face and the preloads, and the fallback fonts have metric overrides so the swap barely moves the layout.

  • Artwork that follows the theme, even in the share image

    Doodles are SVG with CSS variable colours, never hex, so they follow the theme. That breaks in renderers without CSS, like the one that draws the share image, so one function replaces each variable with its light hex before the SVG goes to the renderer, and a test covers it.

  • CSS custom properties
  • SCSS modules
  • Astro
  • TypeScript
  • Vitest
  • Python (fontTools)