Repository navigation
fix(desktop): unify chrome icon size via --icon-size token - #81
Merged
Merged
Conversation
Astro-Han
force-pushed
the
claude/icon-scale
branch
2 times, most recently
from
June 21, 2026 16:16
7528a72 to
8fed42c
Compare
The homepage chrome rendered icons at inconsistent sizes: left-nav icons
were hardcoded 18px (`.maka-nav-icon`) while the nav-primary glyph and every
`buttonVariants` icon sat at 1rem (15px via `size-4`). The nav was the lone
outlier.
Introduce one `--icon-size` token (16px) consumed by both surfaces:
`.maka-nav-icon` / `.maka-nav-primary-icon` / `.maka-nav-row` and the shared
`buttonVariants` (`[&_svg]:size-[var(--icon-size,1rem)]`, 1rem fallback keeps
@maka/ui self-contained). Nav and buttons now track one dial and can't drift
apart again.
Deliberately scoped NOT to flatten everything: dense-meta icons (12-14px:
status dots, footer actions, chips) and hero/emphasis icons (20px+) stay set
at their call sites — they are intentional hierarchy, not drift. A code
review of the earlier attempt flagged that a blanket `svg.lucide { width }`
rule would silently resize ~100 of those small glyphs (e.g. the Checkbox
check at 11px, SessionStatusIcon at 12px) and override their stroke; that
approach is dropped and the contract test now forbids it from returning.
`packages/ui/src/primitives/*` is a separate component library with its own
responsive icon scale and is untouched.
- maka-tokens.css: add --icon-size (16px)
- styles.css: nav icon width/height + nav-row grid column -> var(--icon-size)
- ui.tsx: buttonVariants svg size -> var(--icon-size,1rem)
- design-system.md §1.9 图标: register the token + the by-context tiers
- icon-system-contract.test.ts: assert nav + button consume the token, and
forbid a blanket svg.lucide size rule; update the nav-icon assertion in
localized-main-shell-contract.test.ts
Verified: 1536/1536 desktop tests green; renderer build compiles the token
(built CSS carries --icon-size:16px); screenshots confirm uniform 16px chrome
with dense status icons and hero glyphs unchanged.
Claude-Session: https://claude.ai/code/session_01VWXzHoyncpGYuwbaDEDizD
Astro-Han
force-pushed
the
claude/icon-scale
branch
from
June 21, 2026 16:49
8fed42c to
ee732d7
Compare
jackwener
pushed a commit
that referenced
this pull request
Jun 21, 2026
The homepage chrome rendered icons at inconsistent sizes: left-nav icons
were hardcoded 18px (`.maka-nav-icon`) while the nav-primary glyph and every
`buttonVariants` icon sat at 1rem (15px via `size-4`). The nav was the lone
outlier.
Introduce one `--icon-size` token (16px) consumed by both surfaces:
`.maka-nav-icon` / `.maka-nav-primary-icon` / `.maka-nav-row` and the shared
`buttonVariants` (`[&_svg]:size-[var(--icon-size,1rem)]`, 1rem fallback keeps
@maka/ui self-contained). Nav and buttons now track one dial and can't drift
apart again.
Deliberately scoped NOT to flatten everything: dense-meta icons (12-14px:
status dots, footer actions, chips) and hero/emphasis icons (20px+) stay set
at their call sites — they are intentional hierarchy, not drift. A code
review of the earlier attempt flagged that a blanket `svg.lucide { width }`
rule would silently resize ~100 of those small glyphs (e.g. the Checkbox
check at 11px, SessionStatusIcon at 12px) and override their stroke; that
approach is dropped and the contract test now forbids it from returning.
`packages/ui/src/primitives/*` is a separate component library with its own
responsive icon scale and is untouched.
- maka-tokens.css: add --icon-size (16px)
- styles.css: nav icon width/height + nav-row grid column -> var(--icon-size)
- ui.tsx: buttonVariants svg size -> var(--icon-size,1rem)
- design-system.md §1.9 图标: register the token + the by-context tiers
- icon-system-contract.test.ts: assert nav + button consume the token, and
forbid a blanket svg.lucide size rule; update the nav-icon assertion in
localized-main-shell-contract.test.ts
Verified: 1536/1536 desktop tests green; renderer build compiles the token
(built CSS carries --icon-size:16px); screenshots confirm uniform 16px chrome
with dense status icons and hero glyphs unchanged.
Claude-Session: https://claude.ai/code/session_01VWXzHoyncpGYuwbaDEDizD
jackwener
pushed a commit
that referenced
this pull request
Jun 21, 2026
The homepage chrome rendered icons at inconsistent sizes: left-nav icons
were hardcoded 18px (`.maka-nav-icon`) while the nav-primary glyph and every
`buttonVariants` icon sat at 1rem (15px via `size-4`). The nav was the lone
outlier.
Introduce one `--icon-size` token (16px) consumed by both surfaces:
`.maka-nav-icon` / `.maka-nav-primary-icon` / `.maka-nav-row` and the shared
`buttonVariants` (`[&_svg]:size-[var(--icon-size,1rem)]`, 1rem fallback keeps
@maka/ui self-contained). Nav and buttons now track one dial and can't drift
apart again.
Deliberately scoped NOT to flatten everything: dense-meta icons (12-14px:
status dots, footer actions, chips) and hero/emphasis icons (20px+) stay set
at their call sites — they are intentional hierarchy, not drift. A code
review of the earlier attempt flagged that a blanket `svg.lucide { width }`
rule would silently resize ~100 of those small glyphs (e.g. the Checkbox
check at 11px, SessionStatusIcon at 12px) and override their stroke; that
approach is dropped and the contract test now forbids it from returning.
`packages/ui/src/primitives/*` is a separate component library with its own
responsive icon scale and is untouched.
- maka-tokens.css: add --icon-size (16px)
- styles.css: nav icon width/height + nav-row grid column -> var(--icon-size)
- ui.tsx: buttonVariants svg size -> var(--icon-size,1rem)
- design-system.md §1.9 图标: register the token + the by-context tiers
- icon-system-contract.test.ts: assert nav + button consume the token, and
forbid a blanket svg.lucide size rule; update the nav-icon assertion in
localized-main-shell-contract.test.ts
Verified: 1536/1536 desktop tests green; renderer build compiles the token
(built CSS carries --icon-size:16px); screenshots confirm uniform 16px chrome
with dense status icons and hero glyphs unchanged.
Claude-Session: https://claude.ai/code/session_01VWXzHoyncpGYuwbaDEDizD
jackwener
pushed a commit
that referenced
this pull request
Jun 21, 2026
The homepage chrome rendered icons at inconsistent sizes: left-nav icons
were hardcoded 18px (`.maka-nav-icon`) while the nav-primary glyph and every
`buttonVariants` icon sat at 1rem (15px via `size-4`). The nav was the lone
outlier.
Introduce one `--icon-size` token (16px) consumed by both surfaces:
`.maka-nav-icon` / `.maka-nav-primary-icon` / `.maka-nav-row` and the shared
`buttonVariants` (`[&_svg]:size-[var(--icon-size,1rem)]`, 1rem fallback keeps
@maka/ui self-contained). Nav and buttons now track one dial and can't drift
apart again.
Deliberately scoped NOT to flatten everything: dense-meta icons (12-14px:
status dots, footer actions, chips) and hero/emphasis icons (20px+) stay set
at their call sites — they are intentional hierarchy, not drift. A code
review of the earlier attempt flagged that a blanket `svg.lucide { width }`
rule would silently resize ~100 of those small glyphs (e.g. the Checkbox
check at 11px, SessionStatusIcon at 12px) and override their stroke; that
approach is dropped and the contract test now forbids it from returning.
`packages/ui/src/primitives/*` is a separate component library with its own
responsive icon scale and is untouched.
- maka-tokens.css: add --icon-size (16px)
- styles.css: nav icon width/height + nav-row grid column -> var(--icon-size)
- ui.tsx: buttonVariants svg size -> var(--icon-size,1rem)
- design-system.md §1.9 图标: register the token + the by-context tiers
- icon-system-contract.test.ts: assert nav + button consume the token, and
forbid a blanket svg.lucide size rule; update the nav-icon assertion in
localized-main-shell-contract.test.ts
Verified: 1536/1536 desktop tests green; renderer build compiles the token
(built CSS carries --icon-size:16px); screenshots confirm uniform 16px chrome
with dense status icons and hero glyphs unchanged.
Claude-Session: https://claude.ai/code/session_01VWXzHoyncpGYuwbaDEDizD
jackwener
pushed a commit
that referenced
this pull request
Jun 21, 2026
The homepage chrome rendered icons at inconsistent sizes: left-nav icons
were hardcoded 18px (`.maka-nav-icon`) while the nav-primary glyph and every
`buttonVariants` icon sat at 1rem (15px via `size-4`). The nav was the lone
outlier.
Introduce one `--icon-size` token (16px) consumed by both surfaces:
`.maka-nav-icon` / `.maka-nav-primary-icon` / `.maka-nav-row` and the shared
`buttonVariants` (`[&_svg]:size-[var(--icon-size,1rem)]`, 1rem fallback keeps
@maka/ui self-contained). Nav and buttons now track one dial and can't drift
apart again.
Deliberately scoped NOT to flatten everything: dense-meta icons (12-14px:
status dots, footer actions, chips) and hero/emphasis icons (20px+) stay set
at their call sites — they are intentional hierarchy, not drift. A code
review of the earlier attempt flagged that a blanket `svg.lucide { width }`
rule would silently resize ~100 of those small glyphs (e.g. the Checkbox
check at 11px, SessionStatusIcon at 12px) and override their stroke; that
approach is dropped and the contract test now forbids it from returning.
`packages/ui/src/primitives/*` is a separate component library with its own
responsive icon scale and is untouched.
- maka-tokens.css: add --icon-size (16px)
- styles.css: nav icon width/height + nav-row grid column -> var(--icon-size)
- ui.tsx: buttonVariants svg size -> var(--icon-size,1rem)
- design-system.md §1.9 图标: register the token + the by-context tiers
- icon-system-contract.test.ts: assert nav + button consume the token, and
forbid a blanket svg.lucide size rule; update the nav-icon assertion in
localized-main-shell-contract.test.ts
Verified: 1536/1536 desktop tests green; renderer build compiles the token
(built CSS carries --icon-size:16px); screenshots confirm uniform 16px chrome
with dense status icons and hero glyphs unchanged.
Claude-Session: https://claude.ai/code/session_01VWXzHoyncpGYuwbaDEDizD
jackwener
pushed a commit
that referenced
this pull request
Jun 21, 2026
The homepage chrome rendered icons at inconsistent sizes: left-nav icons
were hardcoded 18px (`.maka-nav-icon`) while the nav-primary glyph and every
`buttonVariants` icon sat at 1rem (15px via `size-4`). The nav was the lone
outlier.
Introduce one `--icon-size` token (16px) consumed by both surfaces:
`.maka-nav-icon` / `.maka-nav-primary-icon` / `.maka-nav-row` and the shared
`buttonVariants` (`[&_svg]:size-[var(--icon-size,1rem)]`, 1rem fallback keeps
@maka/ui self-contained). Nav and buttons now track one dial and can't drift
apart again.
Deliberately scoped NOT to flatten everything: dense-meta icons (12-14px:
status dots, footer actions, chips) and hero/emphasis icons (20px+) stay set
at their call sites — they are intentional hierarchy, not drift. A code
review of the earlier attempt flagged that a blanket `svg.lucide { width }`
rule would silently resize ~100 of those small glyphs (e.g. the Checkbox
check at 11px, SessionStatusIcon at 12px) and override their stroke; that
approach is dropped and the contract test now forbids it from returning.
`packages/ui/src/primitives/*` is a separate component library with its own
responsive icon scale and is untouched.
- maka-tokens.css: add --icon-size (16px)
- styles.css: nav icon width/height + nav-row grid column -> var(--icon-size)
- ui.tsx: buttonVariants svg size -> var(--icon-size,1rem)
- design-system.md §1.9 图标: register the token + the by-context tiers
- icon-system-contract.test.ts: assert nav + button consume the token, and
forbid a blanket svg.lucide size rule; update the nav-icon assertion in
localized-main-shell-contract.test.ts
Verified: 1536/1536 desktop tests green; renderer build compiles the token
(built CSS carries --icon-size:16px); screenshots confirm uniform 16px chrome
with dense status icons and hero glyphs unchanged.
Claude-Session: https://claude.ai/code/session_01VWXzHoyncpGYuwbaDEDizD
jackwener
pushed a commit
that referenced
this pull request
Jun 21, 2026
The homepage chrome rendered icons at inconsistent sizes: left-nav icons
were hardcoded 18px (`.maka-nav-icon`) while the nav-primary glyph and every
`buttonVariants` icon sat at 1rem (15px via `size-4`). The nav was the lone
outlier.
Introduce one `--icon-size` token (16px) consumed by both surfaces:
`.maka-nav-icon` / `.maka-nav-primary-icon` / `.maka-nav-row` and the shared
`buttonVariants` (`[&_svg]:size-[var(--icon-size,1rem)]`, 1rem fallback keeps
@maka/ui self-contained). Nav and buttons now track one dial and can't drift
apart again.
Deliberately scoped NOT to flatten everything: dense-meta icons (12-14px:
status dots, footer actions, chips) and hero/emphasis icons (20px+) stay set
at their call sites — they are intentional hierarchy, not drift. A code
review of the earlier attempt flagged that a blanket `svg.lucide { width }`
rule would silently resize ~100 of those small glyphs (e.g. the Checkbox
check at 11px, SessionStatusIcon at 12px) and override their stroke; that
approach is dropped and the contract test now forbids it from returning.
`packages/ui/src/primitives/*` is a separate component library with its own
responsive icon scale and is untouched.
- maka-tokens.css: add --icon-size (16px)
- styles.css: nav icon width/height + nav-row grid column -> var(--icon-size)
- ui.tsx: buttonVariants svg size -> var(--icon-size,1rem)
- design-system.md §1.9 图标: register the token + the by-context tiers
- icon-system-contract.test.ts: assert nav + button consume the token, and
forbid a blanket svg.lucide size rule; update the nav-icon assertion in
localized-main-shell-contract.test.ts
Verified: 1536/1536 desktop tests green; renderer build compiles the token
(built CSS carries --icon-size:16px); screenshots confirm uniform 16px chrome
with dense status icons and hero glyphs unchanged.
Claude-Session: https://claude.ai/code/session_01VWXzHoyncpGYuwbaDEDizD
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The homepage chrome rendered icons at inconsistent sizes: left-nav icons were hardcoded 18px (
.maka-nav-icon) while the nav-primary glyph and everybuttonVariantsicon sat at 1rem (15px) viasize-4. The nav was the lone outlier. There was also no token for icon size — the one un-tokenized chrome dimension.Solution: one
--icon-sizetoken, two surfacesIntroduce a single
--icon-sizetoken (16px) consumed by both chrome surfaces:.maka-nav-icon/.maka-nav-primary-icon/.maka-nav-row→var(--icon-size)buttonVariants→[&_svg]:size-[var(--icon-size,1rem)](the1remfallback keeps@maka/uiself-contained when used without desktop tokens)Nav and buttons now track one dial and can't drift apart again. Want a different value? Change the one token; both surfaces follow.
Deliberately scoped — not a blanket resize
This does not flatten every icon to one size. Dense-meta icons (12–14px: status dots, footer actions, chips) and hero/emphasis icons (20px+) stay set at their call sites — that's intentional visual hierarchy, not drift.
An earlier attempt used a global
svg.lucide { width }rule. Code review correctly flagged that it would silently resize ~100 intentional small glyphs (e.g. the Checkbox check at 11px,SessionStatusIconat 12px) and override their stroke, and that latersvgrules (e.g..maka-chat-tab-plus svg) still beat it — so the "single authority" claim didn't even hold. That approach is dropped; the contract test now forbids a blanketsvg.lucidesize rule from returning.packages/ui/src/primitives/*is a separate component library with its own responsive icon scale and is untouched.Changes
maka-tokens.css: add--icon-size(16px)styles.css: nav icon width/height + nav-row grid column →var(--icon-size)ui.tsx:buttonVariantssvg size →var(--icon-size,1rem)design-system.md§1.9 图标: register the token + the by-context tiersicon-system-contract.test.ts: assert nav + button consume the token, forbid a blanketsvg.lucidesize rule; update the nav-icon assertion inlocalized-main-shell-contract.test.ts5 files changed (26+/8−) + 1 new test.
Verification
--icon-size:16px; Tailwind emits thevar(--icon-size,1rem)width/height with fallback intact)https://claude.ai/code/session_01VWXzHoyncpGYuwbaDEDizD