Archilyzer · Source

archilyzer

Archilyzer
git clone https://archilyzer.pages.dev/source/archilyzer.git
Log | Files | Refs | README | LICENSE

commit bedebe6d962d5e5276c2a3110388e492a5b0d0bd
parent 5e42829c7461ec50a0de98ce9270bcc64e1247f8
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date:   Fri, 25 Sep 2026 22:58:52 -0400

common: form controls lay out text at design widths too (brand S2 review)

The geometricPrecision rule sat on <html> alone, but Chromium's UA sheet
resets text-rendering to auto on button, input, select and textarea, so they
do not inherit it. After the fix a button still read "Res ults" at DPR 2: its
glyph advances were whole pixels (8/6/7/7/3/4/7), and they are 7.52/6.59/
5.86/6.83/3.22/4.23/5.86 once the rule names form controls too. The phone
menu and the page behind it now read cleanly at DPR 2 on sepia and dark.
themeTokens.test pins the selector.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Diffstat:
Mcommon/components/themeTokens.test.ts | 6+++++-
Mcommon/styles/tokens.css | 10++++++++--
2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/common/components/themeTokens.test.ts b/common/components/themeTokens.test.ts @@ -161,7 +161,11 @@ test(":root sets the one radius and a Signal --brand-mark default; .font-display assert.equal(root.decls.get("--brand-mark"), ACCENTS.signal.onDark); assert.equal(rule(".font-display").decls.get("font-stretch"), "112%"); // Hinted integer advances split words at DPR ≥ 2 on Linux ("Lig ht"). - assert.equal(rule("html").decls.get("text-rendering"), "geometricPrecision"); + // Form controls too: the UA sheet resets their text-rendering to auto. + assert.equal( + rule("html, button, input, select, textarea").decls.get("text-rendering"), + "geometricPrecision", + ); }); test("no retired theme family is left in the sheet", () => { diff --git a/common/styles/tokens.css b/common/styles/tokens.css @@ -131,8 +131,14 @@ or "Signal" measured 9px against its 7.41px design width, which read as "Lig ht" and "Sig nal". geometricPrecision turns hinting off and lays text out at the design widths. It changes nothing where text is not hinted - (macOS, iOS, Android's subpixel layout). */ -html { + (macOS, iOS, Android's subpixel layout). Form controls are named too: the + UA sheet resets their text-rendering to auto, so a button's "Results" would + still read "Res ults". */ +html, +button, +input, +select, +textarea { text-rendering: geometricPrecision; }