Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/app/(home)/_components/network-diagram.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}

Expand Down Expand Up @@ -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;
Expand Down
12 changes: 12 additions & 0 deletions tests/network-diagram.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Loading