Skip to content

design: anchor the wiki shell, set headings in Archivo, harden against clipping - #558

Merged
godofecht merged 1 commit into
mainfrom
design/wiki-shell-and-type
Aug 18, 2026
Merged

godofecht merged 1 commit into
mainfrom
design/wiki-shell-and-type

Conversation

@godofecht

@godofecht godofecht commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

The left margin

It was the visible symptom of a layout that never committed to an edge. .layout used justify-content: center, so the three columns floated in the viewport while the header and tab bar sat at a fixed 1.25rem inset:

before   [ 75px dead ][ sidebar 278 ][ main 816 ][ toc 208 ][ 99px dead ]
                       ^ sidebar at 75        header inner at 20, tabs at 20

Three different left edges on one page. There is now one --gutter and one --shell-max, shared by the header, the tab bar and the layout, and the layout is left-anchored.

Measured at nine widths:

1600px  brand=44  tab=44  sidebar=44   aligned
1440px  brand=24  tab=24  sidebar=24   aligned
1200px  brand=24  tab=24  sidebar=24   aligned
1000px  brand=24  tab=24  sidebar=24   aligned
 860px  brand=14  tab=14  text=14      aligned (sidebar off-canvas by design)
 390px  brand=14  tab=14  text=14      aligned

The gutter also replaces the per-element padding overrides in the responsive block. The layout kept its 1.5rem while the header dropped to 0.9rem, breaking the alignment exactly where space is tightest, and the main column added a second 1.15rem on top — eating a fifth of a 390px viewport before any text was drawn.

Typography

Headings, the wordmark and the hero move to Archivo. Body text stays IBM Plex Sans, code stays IBM Plex Mono.

Plex was already loaded and is a good technical text face with a better mono, but at display sizes it was doing nothing to establish hierarchy — every heading read at the same weight as the UI around it. Archivo is a grotesque with more mechanical bite, which suits a compiler's documentation and gives headings something to say. Keeping Plex for body preserves the humanist texture where it matters, at reading sizes.

Sidebar

The active row was an accent-filled slab running edge to edge into the divider — it read as a selected table row rather than a cursor in a list. The rail already marks position, so the fill is now a quiet surface tint and the rail grows to the row height. Rows are tighter and groups are spaced further apart, so the grouping reads before the items do.

Clipping

Prose, headings and table cells break long tokens rather than push the column sideways. Flex and grid children get min-width: 0, which is what actually allows a column to shrink below its content. Table headers may wrap. The sidebar and contents rail wrap long entries. The page cannot scroll sideways.

An audit across 7 pages × 7 widths (1600 → 390) reports no element escaping its container and no horizontal page scroll. The audit deliberately ignores children of scroll containers — code inside a pre and tables inside .table-wrap are supposed to extend past the viewport and scroll — and ignores the sr-only pattern, which clips by design. Without those exclusions the check reports dozens of false positives.

A check that could only ever fail

wiki_verify.py asserted the home page renders at least two .admonition elements. docs/wiki-home.md contains zero callout markers, so this had been failing on both themes regardless of the code. I confirmed admonitions render correctly where they exist (library/tiny-pointers.md: 1 rendered, no raw markers left), so the assertion now runs against a page that has one.

This was failing before my changes too — I checked by stashing them and re-running.

Validation

  • scripts/wiki_verify.py — all wiki checks pass, both themes
  • scripts/wiki_contrast.py — 0 low-contrast elements
  • Overflow audit — clean at 1600, 1440, 1180, 1000, 820, 600, 390
  • check_wiki_links.py, check_doc_links.py, wiki_nav.py, check_doc_coverage.py, check_doc_examples.py --check-ledger all clean
  • Unit suite 1512 passed, ruff check src clean

…t clipping

The left margin was the visible symptom of a layout that never committed to
an edge. .layout used justify-content: center, so the three columns floated
in the viewport while the header and tab bar sat at a fixed 1.25rem inset. At
1476px wide that left 75px of dead space on the left and 99px on the right,
and the sidebar, the wordmark and the tab row all started on different
vertical lines.

There is now one --gutter and one --shell-max, shared by the header, the tab
bar and the document layout, and the layout is left-anchored. Measured at
nine widths from 1600px down to 390px, the wordmark, the first tab and the
sidebar now start on the same pixel at every one of them. Below 860px the
gutter narrows to 0.9rem and the sidebar goes off-canvas, so the wordmark,
the tabs and the body text share a line instead.

The gutter also replaces the per-element padding overrides in the responsive
block. The layout used to keep its 1.5rem while the header dropped to 0.9rem,
which broke the alignment exactly where space is tightest, and the main
column added a second 1.15rem on top, eating a fifth of a 390px viewport
before any text was drawn.

Headings, the wordmark and the hero are set in Archivo. Body text stays IBM
Plex Sans and code stays IBM Plex Mono: Plex is a good technical text face
and a better mono, but at display sizes it was doing nothing to establish
hierarchy. Archivo is a grotesque with more mechanical bite, which suits a
compiler's documentation and gives the headings something to say.

The sidebar's active row was an accent-filled slab running edge to edge into
the divider. The rail already marks position, so the fill is now a quiet
surface tint and the rail grows to the row height. Rows are tighter and the
groups are spaced further apart, so the grouping reads before the items do.

Clipping: prose, headings and table cells break long tokens rather than push
the column sideways; flex and grid children get min-width: 0, which is what
actually lets a column shrink; table headers may wrap; the sidebar and the
contents rail wrap long entries; and the page cannot scroll sideways. An
audit across seven pages at seven widths reports no element escaping its
container and no horizontal page scroll.

Also fixes a wiki check that could only ever fail: wiki_verify asserted the
home page renders at least two admonitions, and the home page contains no
callout markers at all. Admonitions render correctly where they exist, so
the assertion now runs against a page that has one.

Contrast audit 0 low-contrast elements, all wiki checks pass, unit 1512.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@godofecht
godofecht merged commit 22e9f8f into main Aug 18, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant