Uh oh!
There was an error while loading. Please reload this page.
chore(desktop): drop tokens nothing reads - #4017
Closed
Astro-Han wants to merge 1 commit into
Closed
Conversation
Twenty-four custom properties in `maka-tokens.css` have no `var()` consumer anywhere — not in renderer CSS, not in `@maka/ui`, not in stories, and not in Astryx, which reads a handful of Maka properties through its own theme bridge and is checked separately here. A token nobody reads still has to be kept consistent with the palette, the theme blocks, and every audit that walks the file, so it costs maintenance and returns nothing. Removed: the checked-control colors (`--control`, `--control-foreground`), four unread wash tiers, `--border-width-accent`, `--foreground-alpha-10`, `--space-0`, `--opacity-pending`, `--ease-in-out-strong`, `--maka-text-display-2`, and `--h-control-xl` / `--h-control-2xl`, whose own comment recorded that nothing reads them. Three groups are more than single tokens: - The `--elevation-*` tier was three aliases of `--shadow-*` with one consumer between them. The tier goes and `settings/form.css` names `--shadow-med` directly, which is the value it already resolved to. - The icon scale mirrored `ICON_SIZE` in `@maka/ui`'s `icons.tsx` by its own admission. `ICON_SIZE` has 209 consumers and the CSS mirror had two; the two CSS-clamped rungs stay and the rest go, including `--icon-size`, an alias marked "deprecated, one release", and `--icon-chrome`, whose only reader was that alias. - The z-index ladder kept four rungs no layer sits on. Reserving unused floors invites the next reader to pick by name rather than by stacking, so the ladder now lists what exists: sticky, titlebar, tooltip, overlay, plus the two micro tiers. Four comments that named a deleted token as live are corrected with it. `--foreground-8` is deliberately kept beside `--foreground-alpha-*`: the first mixes into the background and is opaque, the second is a real alpha channel, and the file already records why the two cannot substitute for each other. Generated-by: Claude Code
Astro-Han
commented
Aug 27, 2026
ContributorAuthor
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 freeto 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.
Summary
Twenty-four custom properties in
maka-tokens.csshave novar()consumer anywhere — not in renderer CSS, not in@maka/ui, not in stories, and not in Astryx, which reads a handful of Maka properties through its own theme bridge and was checked separately. A token nobody reads still has to be kept consistent with the palette, the light and dark blocks, and every audit that walks the file, so it costs maintenance and returns nothing.Three of the groups are more than single tokens:
--elevation-*was three aliases of--shadow-*with one consumer between them. The tier goes;settings/form.cssnames--shadow-meddirectly, which is the value it already resolved to.ICON_SIZEin@maka/ui'sicons.tsxby its own admission.ICON_SIZEhas 209 consumers, the CSS mirror had two. The two CSS-clamped rungs stay; the rest go, including--icon-size(an alias marked "deprecated, one release") and--icon-chrome, whose only reader was that alias.Four comments that named a deleted token as live are corrected with it.
--foreground-8is deliberately kept beside--foreground-alpha-*: the first mixes into the background and is opaque, the second is a real alpha channel, and the file already records why they cannot substitute for each other.Verification
apps,packages,native,scripts(css/ts/tsx/js/mjs/html) plus@astryxdesign/core/distandtheme-neutral, excluding build output and caches. Re-run after the deletions: novar()reference to any removed property, and no bare mention left in the token file.setProperty/getPropertyValueare--backgroundand--maka-drawer-tooltip-x.npm --workspace @maka/desktop run build:with-deps— passes, so no CSS parse or resolution error.e2e/link-color-contract.spec.ts,e2e/settings-row-focus-ring.spec.ts— 5 passed. These assert computed color and focus-ring geometry, the two surfaces closest to the removed color and shadow tiers.npm run format:check— clean.Root cause
No behavior changes: every removed property resolved to nothing at every call site, because there were no call sites. The one substituted value (
--elevation-overlay→--shadow-med) is the same computed shadow.Capability given up: the WCAG measurements recorded on
--control(L0.65 for 3:1 non-text contrast) leave with the token. Anyone re-adding checked-control styling would re-derive them; the reasoning stays in git history at this commit's parent.AI use
Select exactly one:
Tool(s) and scope: Claude Code — the consumer audit, the deletions, and this description. Reviewed and verified by the contributor before opening.
Checklist
Does this PR entail a change in behavior?