From 790d2c0c0aa3ce30ffd114b7d25527d431fedbec Mon Sep 17 00:00:00 2001 From: David Gracia Date: Fri, 10 Jul 2026 23:47:34 -0600 Subject: [PATCH] chore(storybook): apply DS base typography to the story canvas MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Deliberate, standalone re-baseline (the follow-up flagged when Checkbox's first raw-text story exposed this). Storybook rendered inherited text in its own default font because nothing set a base on the canvas; Pharos components set their own font, but raw markup and font-inheriting elements fell back to Storybook's default — so Chromatic snapshotted them in the wrong typeface. - Add a `#storybook-root` rule in preview.css: DS base type (font-family sans + 14/20 + neutral-900), scoped to the canvas so docs (#storybook-docs) are untouched. Mirrors a real consumer that sets the DS type as its base (per D8/D9 the consumer provides typography). - Drop the now-redundant per-story decorator from Checkbox.stories. Consequence: ~50 Chromatic snapshots re-baseline (typography/color of inherited text only — no behaviour change). REQUIRES reviewing the diffs and accepting them knowingly. Storybook-only (never bundled, D9). No changeset. typecheck + test:storybook a11y (99) + build-storybook green. Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_01AgnovjGivnndpV7Yzt6AmY --- .storybook/preview.css | 21 +++++++++++++++++++++ src/components/Checkbox.stories.tsx | 18 +++--------------- 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/.storybook/preview.css b/.storybook/preview.css index 35d6aba..ff9c78b 100644 --- a/.storybook/preview.css +++ b/.storybook/preview.css @@ -3,6 +3,27 @@ * into the published library. The published library is pure CSS Modules * with hashed class names — see Decision D9. */ +/* Design-system base typography for the story canvas. + * + * Pharos components set their own `font-family`, but raw markup in a story + * (a bare `