diff --git a/src/app/(home)/_components/network-diagram.module.css b/src/app/(home)/_components/network-diagram.module.css index 8a0740e..b190b45 100644 --- a/src/app/(home)/_components/network-diagram.module.css +++ b/src/app/(home)/_components/network-diagram.module.css @@ -110,7 +110,7 @@ margin: 0; color: var(--color-fd-foreground); font-family: var(--font-mono), ui-monospace, monospace; - font-size: 0.9375rem; + font-size: var(--km-text-sm); font-weight: 600; letter-spacing: -0.03em; line-height: 1.35; @@ -119,7 +119,7 @@ .meta { margin: 0.15rem 0 0; color: var(--color-fd-muted-foreground); - font-size: 0.8125rem; + font-size: var(--km-text-xs); line-height: 1.4; } @@ -153,7 +153,7 @@ margin: 0; color: var(--color-fd-primary); font-family: var(--font-mono), ui-monospace, monospace; - font-size: 0.8125rem; + font-size: var(--km-text-xs); line-height: 1.25rem; opacity: 0; transition: opacity var(--nh-dur-out) ease-in; diff --git a/tests/network-diagram.test.mjs b/tests/network-diagram.test.mjs index 0f86064..5838e3e 100644 --- a/tests/network-diagram.test.mjs +++ b/tests/network-diagram.test.mjs @@ -66,6 +66,18 @@ test("mounts reduced-motion step layers only after the preference is known", () ); }); +test("uses type scale tokens for the 13px and 15px labels and keeps step buttons at 14px", () => { + assert.equal(css.includes("0.8125rem"), false); + assert.equal(css.includes("0.9375rem"), false); + assert.equal(/\b13px\b/.test(css), false); + assert.equal(/\b15px\b/.test(css), false); + assert.match(css, /\.kicker \{[^}]*font-size: var\(--km-text-sm\);/s); + assert.match(css, /\.meta \{[^}]*font-size: var\(--km-text-xs\);/s); + assert.match(css, /\.chip \{[^}]*font-size: var\(--km-text-xs\);/s); + assert.match(css, /\.step \{[^}]*font-size: 0\.875rem;/s); + assert.match(css, /\.note \{[^}]*font-size: 0\.75rem;/s); +}); + test("crossfades reduced-motion step changes with opacity only", () => { assert.match(diagram, /styles\.stepLayer/); assert.equal(diagram.includes("if (reduced) return"), false);