site: one design system for the four sites
The approved design (19 Nov) gives the four sites one design system. This PR ports it into the generator of the three house sites, so each built page equals its approved page. The two house copies follow in openfluids/openfluids.github.io and BoringQuantSystems/boringquantsystems.github.io; the type site follows in machine-made/type.
What changes
src/system.cssis the one stylesheet: tokens and components.build.pywrites it into each page without its comments, because a linked file cost 0.3 s of render time on the phone run.site.jsonsets only six colours, the house face, a bar-2 label per group and the groups. The name paragraph (blurb) is removed, as the approved design says.- Each page: bar 1 (the four sites), bar 2 (logo and sections), the banner, the house line, Latest, the plates with live GitHub facts (language, latest release or "unreleased", last commit), the houses row, the footer. A 404 page whose addresses start at the site root, since Pages serves it at any depth.
fetch.pyreads the facts with one GraphQL call throughgh. Any failure exits 1, and the build writes no file, so a stale page cannot ship.homebrew-tapis never listed. Latest shows distinct repositories, newest first, at most three.- Images: AVIF and JPEG at two widths with
srcset,width/height, lazy loading below the fold, a high-priority preload for the banner.og.jpgis 1200 x 630 per site. Favicon and touch icon per site;mark.svgon machine-made. - Fonts: Heddle 0.2.0 is added from the
heddle-v0.2.0release.fonts/SOURCES.jsonrecords version, asset and SHA-256 of every source font, andcheck_site.pypins the same hashes. Each page ships a subset of each font. The subset keeps every axis and every feature the style uses, and the build fails if one is lost. - The build runs under
uv run --with fonttools==4.68.0 --with brotli==1.2.1 --with pillow==13.0.0(README, Build; gate.sh).src/style.cssand the unused Warp italic are removed.
Differences from the approved style
The approved system.css is copied. Five changes keep the existing checks passing:
- Colour-only
:hoverrules sit in@media (hover: hover). - Transitions and the bar-2 scroll animation sit in
@media (prefers-reduced-motion: no-preference). - The Warp stack names no system font: Georgia is gone.
These three change no pixel of a still page.
-
Tap targets on a phone (its own commit,
site: 44 px tap targets on a phone, so it can be reverted alone). The approved style had bar-1 and footer links 32 px high below 720 px, the logo 28 px and Latest links 24 px. The existing check asks for 44 px at 390 px, and I did not lower it:- Below 720 px, bar-1 rows and footer links are 44 px high and the logo box is 44 px high. At 390 px, bar 1 is 24 px taller.
- Below 520 px, a Latest link has 12 px of padding inside its row, so the row does not move.
- Nothing changes at 720 px and wider.
-
The type page on a phone narrower than 390 px (its own commit,
site: the type page fits a phone narrower than 390 px). Two lines of the type home page do not wrap: the type line and the family tiles. The approved page scrolled sideways at 320 and 360 px:- The type line needs 317 px in a 288 px column.
- The Heddle tile "Grotesk 1958" needs 285 px of text width, where a 320 px phone leaves 240 px and a 360 px phone leaves 280 px.
Below 390 px the type line uses
font-stretch: 70%, the narrowest width of Heddle, and a tile uses--step-3. Nothing changes at 390 px and wider. The house pages carry the rule in their style block but show no tile and no type line.
Checks: old and new
Every existing check is kept or replaced by a stronger one. Where one was replaced:
| Old check | New check | Why the new one is stronger |
|---|---|---|
style.css is a file; a page style block may hold no colour | Exactly two style blocks: the font faces and colours (built from allow.json), then src/system.css byte for byte without comments. Every CSS rule check runs on that block | A page cannot carry a style that differs from the source |
Palette --bg --fg --muted --accent --edge; text and muted 4.5:1 | Six tokens equal allow.json; text 7:1 and muted 4.5:1 on the ground and on the surface, accent 3:1 | Higher floors and two more pairs |
docs/fonts/* are the full 0.2.0 files (SHA-256) | The source files in fonts/ are pinned twice: SOURCES in check_site.py and SOURCES.json. Each shipped subset is opened with fontTools: same family, same axes, used features kept, no glyph outside the source, every character the page sets in it present | The old hash could not prove the page's text is covered |
| Preload of Weft and the text font | Exactly one font preload (the house face) and, on the home page, exactly one image preload (the banner, AVIF, high priority) | Tighter |
| Font stacks name generic families only | Same, with machine-made families allowed as fallbacks (Heddle falls back to Sans). Also, in the browser, no glyph is drawn in a system font at 390 and 1280 px on the home page and the 404 page | It measures what the reader sees |
| No weight other than 400 | Every weight lies inside the range of the variable font that the rule uses, so no weight is faked. All text on the house pages is still checked at weight 400, normal style, in the browser | Same goal; the type-site rules (Heddle 650) are now covered |
--fs 16 px, --ls 24 px, --ws, body line height 1.55 | The step tokens equal 1.25^n rem; every font size in the style is a step token; body line height 1.5. Word spacing is gone because the approved design has none | Covers every size, not two tokens |
CSS touch rules for .bar a, .ds a | .b1 li and footer a 44 px, .secs a 44 px, .ds a 12 px padding. The browser check (every link at least 44 px at 390 px) is unchanged | Same floor |
Footer dot drawn by footer a:not(:last-child)::after | Footer dot drawn by footer li::before | Same rule, new markup |
Plate hover through outline-color | Plate hover through filter in (hover: hover) | Same rule, new markup |
| One gradient, the banner mask, once | An exact list of two masks (banner and bar-2 fade), each once with and once without -webkit- | Same strength |
| No backslash in CSS | None except content: "\00b7" (the middle dot) | Tightly bounded |
a:focus-visible outline in the accent | :focus-visible outline in the accent | Covers every element |
Plate grid auto-fill minmax(240px) | 12-column rows, a 3-column plate grid, 1 column below 520 px. In the browser, equal image heights and gaps in every grid | Checks the layout itself |
No nowrap anywhere | In the browser, no element past the right edge outside a scrolling or clipping box, at 320 to 1920 px. The old sideways-scroll check is kept | The design needs nowrap for hyphenated words and facts; this measures the overflow nowrap could cause |
<source> forbidden | Allowed only inside <picture>, as image/avif with a srcset. Every srcset URL must resolve | Bounded |
og:image is the banner at 1408 x 469 | og:image is og.jpg at 1200 x 630, size checked | Correct social size |
| Line and name paragraph side by side | The house line in the house face, exact. The build rejects a blurb | The blurb was removed by the approved design |
| Exact markup of bar, footer and plates | Exact markup of bar 1, bar 2, footer and plates. Latest, the houses row and every facts line must match the fetched data | Adds the live data |
Self-test: a site renamed loom-x passes | Removed. The gate runs every check on three houses, with three names and three faces | A house is now tied to its name through the houses row, so a lone rename no longer builds |
New checks:
- Spacing scale (only
--sp-*tokens in margin, padding, gap and insets). - One h1 and heading order.
- Banned words.
homebrew-tap.- 404 addresses from the root, and a 404 served at a nested path loads its fonts and images.
- The build fails when the fetch fails or the facts file lacks a project.
- Latest has no repeat.
- No facts line wraps at 1280 px.
- axe-core (
MM_AXE).
Added after the first review:
- Every AVIF and JPEG must decode, with Pillow, to the size it declares.
- An empty
index.htmlor404.htmlfails. - Each record of the facts file is checked before use.
site.jsonandallow.jsonmust agree on the theme.- A group may not take the id of a built-in section (Latest, the houses row).
- Every style block of the 404 page must load from the root.
- The
-rsrepositories of the other houses are known names.
The self-test has 338 cases.
Proof
Generator head d171410a9ca1af0c280c949c404295309057e483. Gate, with MM_CHROME and MM_AXE set:
FETCHED
DETERMINISTIC
BRAND SKIPPED: set MM_FONTS=brand-fonts to check brand/
SELF-TEST OK (338 cases)
OK
SHOTS OK (9 renders)
OK
SHOTS OK (9 renders)
OK
SHOTS OK (9 renders)
HOUSES OK
grep clean
Contrast (WCAG ratio):
| House | text / ground (7) | muted / ground (4.5) | text / surface (7) | muted / surface (4.5) | accent / ground (3) |
|---|---|---|---|---|---|
| machine-made | 16.58 | 5.84 | 15.41 | 5.43 | 4.35 |
| openfluids | 16.12 | 6.11 | 14.90 | 5.65 | 9.64 |
| BoringQuantSystems | 17.06 | 6.01 | 16.15 | 5.68 | 11.52 |
axe-core 4.14.1, at 1280 px: 0 violations on each home page and each 404 page (machine-made, openfluids, BoringQuantSystems).
Lighthouse 12 (performance / accessibility / best practices / SEO), served from a local folder:
| Page | Mobile | Desktop |
|---|---|---|
| machine-made | 100 / 100 / 100 / 100 | 100 / 100 / 100 / 100 |
| openfluids | 100 / 100 / 100 / 100 | 100 / 100 / 100 / 100 |
| BoringQuantSystems | 100 / 100 / 100 / 100 | 100 / 100 / 100 / 100 |
| machine-made 404 | 100 / 100 / 100 / 100 | 100 / 100 / 100 / 100 |
| openfluids 404 | 100 / 100 / 100 / 100 | 100 / 100 / 100 / 100 |
| BoringQuantSystems 404 | 100 / 100 / 100 / 100 | 100 / 100 / 100 / 100 |
Bytes loaded per page, after scrolling to the end:
| Page | Fonts | Images at 390 px | Images at 1280 px |
|---|---|---|---|
| machine-made | 48,828 | 135,555 | 86,298 |
| openfluids | 74,844 | 155,031 | 119,712 |
| BoringQuantSystems | 60,408 | 54,730 | 58,958 |
Shots, opened and checked by eye: shots.py writes home-390.png, home-1280.png, 404-390.png and 404-1280.png for each house. Each page shows bar 1, bar 2, the banner, the line, Latest, the groups, the houses row and the footer, with no overflow.
Pixel comparison of each built page against its approved page: full page at 1280 x 900, device scale 1, lazy images loaded, a pixel counted when its summed RGB difference is over 24.
| Page | Height built / approved | Differing area |
|---|---|---|
| machine-made | 2532 / 2532 px | 0.000 % (0 px) |
| openfluids | 2264 / 2264 px | 0.000 % (0 px) |
| BoringQuantSystems | 1384 / 1384 px | 0.0005 % (8 px, rows 68 to 72: the 28 px bar-2 avatar, scaled here from the 360 px avatar, while the approved page used GitHub's 56 px copy) |
The houses built from this head are byte-identical to their copies in the two house repositories (hash lists in those PRs).