29

Defaults

How every page looks unless it says otherwise — set here, on this page.

This page is where the site's look lives. Its own frontmatter holds a theme, and that theme is the default for every other page. Change a value here and save, and the whole site follows, with no rebuild and no deploy.

Each page can also carry a theme of its own. It only needs the keys it changes, and they apply while that page is open. If this page goes missing, the site falls back to Tapswipe's built-in defaults, which are the values written below.

Colours

Colours are hex, a name, or rgb(), hsl() or oklch() of plain numbers.

Palette

The tile and cover gradient (from to to, with an optional middle colour via), its text (ink) and its secondary text (muted). A page that names no palette of its own wears this one. A palette is always whole: all four colours, or none at all, so a page either keeps its own completely or takes this one completely.

Fonts

Three roles: sans for text, display for titles, mono for numbers and code. Each takes one of ten typefaces, all self-hosted, and a face is only downloaded once a page uses it:

displayWeight sets how heavy titles are, from 100 to 900 in hundreds. Not every face has every weight: Playfair stops at 500 and Instrument Serif has only 400, so heavier weights are faked.

Story type

size and leading set a story's body text in pixels. A story is paginated by measuring its type, so the line height is always given explicitly.

Corners and motion

radius is the corner of a cover or a pane in pixels (a tile's is four less). motion.duration is how long a tile takes to grow into its page, in milliseconds.

Themed pages

After Dark, Swiss Grid, Soft Focus, Built for Speed and Get Paid each override some of these, and nothing else about them is different.