Repository navigation
design: anchor the wiki shell, set headings in Archivo, harden against clipping - #558
Merged
Merged
Conversation
…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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The left margin
It was the visible symptom of a layout that never committed to an edge.
.layoutusedjustify-content: center, so the three columns floated in the viewport while the header and tab bar sat at a fixed1.25reminset:Three different left edges on one page. There is now one
--gutterand one--shell-max, shared by the header, the tab bar and the layout, and the layout is left-anchored.Measured at nine widths:
The gutter also replaces the per-element padding overrides in the responsive block. The layout kept its
1.5remwhile the header dropped to0.9rem, breaking the alignment exactly where space is tightest, and the main column added a second1.15remon 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
preand tables inside.table-wrapare supposed to extend past the viewport and scroll — and ignores thesr-onlypattern, which clips by design. Without those exclusions the check reports dozens of false positives.A check that could only ever fail
wiki_verify.pyasserted the home page renders at least two.admonitionelements.docs/wiki-home.mdcontains 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 themesscripts/wiki_contrast.py— 0 low-contrast elementscheck_wiki_links.py,check_doc_links.py,wiki_nav.py,check_doc_coverage.py,check_doc_examples.py --check-ledgerall cleanruff check srcclean