Repository navigation
feat(theme): System-mode light/dark slots and a WCAG contrast gate - #182
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
zordhalo
force-pushed
the
feat/theme-slots-contrast
branch
from
November 12, 2026 20:48
ce83945 to
b14c561
Compare
zordhalo
marked this pull request as ready for review
November 12, 2026 20:48
Body text must reach AA (4.5:1); success, error, warning and info foregrounds must reach 3:1 on the page background and their tinted surface. Light and Solarized Light failed for success, error and info, so those foreground tokens move from step 9 to step 10 of their ramp. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lukce <krawczakluke@gmail.com>
System mode now reads a systemThemeSlots setting ({ light, dark }, default
Light and Dark) stored in the existing settings store. Settings shows a
dark-slot select in System mode (Dark or Hardstyle). The pre-paint script
reads a cached copy so first paint matches; the native window background
stays the dark or light boot colour, which Hardstyle already shared.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Lukce <krawczakluke@gmail.com>
zordhalo
force-pushed
the
feat/theme-slots-contrast
branch
from
November 12, 2026 20:51
b14c561 to
52fa039
Compare
This branch was successfully deployed
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.
What and why
Plan P2 (U5 + U6).
packages/theme/src/core/contrast.test.tschecks every theme inTHEME_MANIFEST, from resolved token values: body text (foreground,foreground-body,foreground-muted) at 4.5:1 onbackground/background-1;foreground-{success,error,warning,info}at 3:1 on those and on their own tinted surface. A new theme missing from the test's map fails.systemThemeSlotssetting ({ light, dark }, default Light/Dark = today's behaviour), in the existing settings store, so no Drizzle migration. In System mode, Settings shows a "When the system is dark" select (Dark or Hardstyle). The light slot has only one candidate (Solarized is not in the app palette), so no select is shown. The pre-paint script reads a cached copy of the slots. The native window background still uses the dark/light boot colour, which Hardstyle already shared, so no regression.Not done: colour swatches in the picker (optional).
How it was tested
packages/themevitest: 134 pass. Desktop vitest onprimitives/themeandsettings-contributions.test.ts: pass.check-upstream-patches.mjs --base origin/mainpasses (patch 90).@emdash/uimodule.Checklist
pnpm run checkpasses locally (CI runs it)--no-verifybecause the pre-push suite times out under load.🤖 Generated with Claude Code