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.
This commit is contained in:
@@ -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. */
|
||||
|
||||
@@ -30,9 +30,15 @@ const { label, tone = 'accent', as: Tag = 'p' } = Astro.props;
|
||||
<style>
|
||||
.eyebrow {
|
||||
margin: 0;
|
||||
/* `font:` shorthand so check-tokens.mjs (which only matches `font-size: Npx`)
|
||||
leaves us alone. 10px / 600 / .1em is the canonical midpoint of the
|
||||
10–11px / 500–700 / .08–.1em range the design-system context documents. */
|
||||
/* UNRESOLVED — this consolidates three drifted legacy declarations and
|
||||
matches none of them exactly:
|
||||
styles.css 500 10px 'DM Mono', monospace .1em
|
||||
chapters.css 700 11px monospace .12em
|
||||
skills-review/styles.css 700 10px monospace .1em
|
||||
`var(--step-0)` (11px) is task 02's decided token, so the size is
|
||||
deliberate. The 600 weight is not — legacy uses 500 and 700, never 600.
|
||||
Settle this with the font decision in .agents/context/design-system.md;
|
||||
until then this renders slightly differently from every source block. */
|
||||
font:
|
||||
600 var(--step-0) 'DM Mono',
|
||||
monospace;
|
||||
|
||||
Reference in New Issue
Block a user