From d96d61fa4969edc6af99bf277630cd4e1d4e766b Mon Sep 17 00:00:00 2001 From: Marcos Paulo Date: Sat, 5 Sep 2026 06:50:25 +0000 Subject: [PATCH] fix(components): remove gate-evasion CSS from CodeBlock and Eyebrow CodeBlock declared `font: 12px/1.75 'DM Mono', monospace` and Eyebrow `font: 600 var(--step-0) ...`, both written as the `font:` shorthand with a comment saying it was chosen because check-tokens.mjs only matches `font-size: Npx`. CodeBlock's rule was also fabricated: `.worktrees pre`, the block the component documents itself as reproducing, sets no font at all. Dropped it. Eyebrow keeps var(--step-0) (task 02's decided token) but the 600 weight matches no legacy declaration -- 500, 700, 700. Marked UNRESOLVED for the font decision. --- src/components/primitives/CodeBlock.astro | 15 ++++++++------- src/components/primitives/Eyebrow.astro | 12 +++++++++--- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/components/primitives/CodeBlock.astro b/src/components/primitives/CodeBlock.astro index 23ef3f5..ac910ee 100644 --- a/src/components/primitives/CodeBlock.astro +++ b/src/components/primitives/CodeBlock.astro @@ -33,13 +33,14 @@ const { tone = 'gold', label } = Astro.props; background: var(--ink); } - /* `font:` shorthand so check-tokens.mjs (which only matches `font-size: Npx`) - leaves us alone. */ - .code-block code { - font: - 12px/1.75 'DM Mono', - monospace; - } + /* Deliberately no font declaration. `.worktrees pre` — the block this + component reproduces — sets none either, so the text inherits the UA + default for `pre`. Declaring one here would change how the page renders, + which is a redesign, not a refactor. + Two *other* legacy blocks do set one, and neither is this component's job: + `chapters.css .panel code` (14px/1.8 ui-monospace) and + `skills-review/styles.css .preview code` (12px/1.65 ui-monospace). Whoever + migrates those needs tokens for them first. */ /* Lighter text used by `.skills>pre` and a handful of preview blocks where the content reads as documentation rather than a terminal session. */ diff --git a/src/components/primitives/Eyebrow.astro b/src/components/primitives/Eyebrow.astro index fdde4e0..82ad33b 100644 --- a/src/components/primitives/Eyebrow.astro +++ b/src/components/primitives/Eyebrow.astro @@ -30,9 +30,15 @@ const { label, tone = 'accent', as: Tag = 'p' } = Astro.props;