Foundation · scaffolding & baseline
A pattern from the gf.cx specimen book
One base layer, linked, never copied
Every gf.cx surface wears the same warm paper: one background, one ink, one pair of typefaces, one prose spec. That sameness should live in a single file that pages link, not in a block of tokens each page pastes into its own head. Link it once, and a surface re-skins with one line.
"link the shelf, never inline-copy the tokens"
The problem
The canonical new-page template carried the portfolio tokens and the prose
spec as an inline <style> block. Pages were started by copying
it, so every page held its own copy. Copies drift. One page rounds the body to
16px, another drops --gold, a third forgets the font link, and the
surface silently fails the baseline checks. The growth.gf.cx sweep found 67
pages in exactly that state. No single page is wrong enough to notice; the set
is just quietly inconsistent.
The pattern
Lift the block, verbatim, into one stylesheet on the assets shelf and have every page link it. The file is rule-identical to what the template used to inline, so adopting it changes nothing visually. What it changes is where the truth lives.
<link href="https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible…" rel="stylesheet">
<link rel="stylesheet" href="https://assets.gf.cx/almanac/almanac.css">
The shelf file is two things. First, the tokens: --bg warm
paper, --ink, --ink-soft, --accent,
--gold, --crimson, the rules, and the three font stacks
(--sans Atkinson Hyperlegible, --serif Newsreader,
--mono). Second, the prose spec: body at 17px/1.58, a
.page column capped at 720px, and the voice palette of serif-italic
em, serif h2, bold micro-label h3, mono
code, and the .pull and .cap asides.
Live from the tokens this very page was built on.
Re-skin with one line
Everything in the file reads a custom property, so a surface that wants its own accent re-declares the property and stops. It does not copy a rule.
<link rel="stylesheet" href="https://assets.gf.cx/almanac/almanac.css">
<style> :root { --accent: #1f3a5f; } </style> /* overrides only */
Links the shelf and adds nothing.
Links the shelf, plus one override line.
override
:root { --accent: #1f3a5f } is the whole difference. (Live CSS,
not a screenshot.)
Two tiers
The base is the universal default. A masthead band is a separate, opt-in choice, and keeping them apart is what stops the base from growing opinions.
- Tier 1, the base. Tokens plus prose, via
almanac.css. Every surface has it. maps.gf.cx is the plain example: base, no band. - Tier 2, the masthead band. The masthead shelf, linked by the surfaces that want an editorial band. It consumes the same tokens, so it inherits any override for free. Choosing it is a per-surface decision, not a requirement.
Fonts stay out of the file on purpose. Keep the canonical
fonts.googleapis.com link in the page head; the zone localises it
to Cloudflare, and a stylesheet cannot do that on a page's behalf.
Where it applies
The base is one of the six surface markers: the localised fonts link, the
token block (now delivered by the shelf), a page-header or masthead, the favicon
plane, an og:image, and the made-with footer. A page missing the
base is under-finished, not minimal.
- Use it on every new page and surface, and when reconciling an older page that still carries an inline token block: delete the block, link the shelf, keep only genuine overrides.
- Override through custom properties only. If you find yourself copying a rule to change it, the knob is missing from the shelf; add the knob there.
- Skip for pages that deliberately look nothing like the portfolio (a dark theme that rewrites every token is a fork, not an override).
Reusable elements
- The shelf file —
assets.gf.cx/almanac/almanac.css, versioned, rule-identical to the template's old inline block. - The override line — a
:rootblock that re-declares tokens and nothing else. - The drift guard —
gfcx_almanac_audit.pyreports pages that miss the base or still inline a copy.
Reference
- Origin
- The almanac styling refresh, 2026-10-25: the new-page template's inline styles lifted into a shelf after an audit found most in-scope pages missing the base.
- Reference impl
- assets.gf.cx/almanac; the new-page template is the canonical starter that links it.
- Failure it prevents
- Hand-copied token blocks that drift page by page, so a surface fails the baseline without any single page looking wrong.
- Related patterns
- Reconcile onto the new-page template, the migration move; How this page shipped, the same one-shared-file model applied to provenance; The rail that jumps between pages, a Tier 2 masthead concern.
- Build cost
- One
<link>per page. A re-skin is one line.