fix(ui): raise dark-mode contrast for faint text and borders - #180
Merged
Merged
Conversation
WCAG contrast math against the existing --v2-grey-* scale showed real failures once elevated surfaces (--v2-background-bg-layer-03/-04) are involved: - text-faint (grey-600) measured ~2.9:1 against layer-03/-04 cards, below the 4.5:1 body-text minimum. Moved to grey-500 (same lightness as text-muted), which holds >=3:1 against every bg-* surface and >=4.5:1 against bg-base/-deep, where faint text is mostly used. - border-muted/-base (alpha-light-8/-10) composited to ~1.1-1.3:1 against layer-02/-03 surfaces — practically invisible dividers. Bumped to alpha-light-14/-16 (border-strong stays at -20, so the muted/base/strong ladder is still distinct). - overlay hover/pressed (alpha-light-6/-10) bumped to -10/-16 so press/hover feedback stays perceptible on dark surfaces. Only existing --v2-grey-*/--v2-alpha-light-* steps are used, no new tokens introduced, and the light theme block is untouched. Part of the dark-mode/Apple-like design pass (opencode#164). Co-Authored-By: Claude Sonnet 5 <[email protected]>
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
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.
Issue for this PR
Closes #164
Type of change
What does this PR do?
packages/ui/src/v2/styles/theme.cssdefines the--v2-*design tokens for light/dark via[data-color-scheme="light"]/[data-color-scheme="dark"]. I computed WCAG relative-luminance contrast ratios for the dark-mode pairs against every--v2-background-bg-*surface (base/deep/layer-01..04) and found real failures once an elevated surface (layer-03/-04, used by cards/popovers) is involved:--v2-text-text-faintmapped togrey-600, which measures ~2.9:1 against layer-03/-04 — below the 4.5:1 body-text minimum. I moved it togrey-500(same lightness as--v2-text-text-muted), which holds ≥3:1 against every background surface and ≥4.5:1 againstbg-base/-deep, where faint text is used most often.--v2-border-border-muted/-baseusedalpha-light-8/-10, which composite to only ~1.1-1.3:1 against layer-02/-03 — practically invisible dividers on dark surfaces. Bumped toalpha-light-14/-16(kept--v2-border-border-strongat-20so the muted/base/strong ladder stays distinct).--v2-overlay-simple-overlay-hover/-pressedusedalpha-light-6/-10, bumped to-10/-16so hover/pressed feedback stays perceptible on dark surfaces.I only reused existing
--v2-grey-*/--v2-alpha-light-*steps already inpackages/ui/src/v2/styles/colors.css— no new tokens were introduced, and the light-theme block (:rootand[data-color-scheme="light"]) is untouched. This is the foundation issue for a larger dark-mode/Apple-like design pass (issues #165-#178 depend on it).How did you verify your code works?
bun run typecheckinpackages/apppasses clean.--v2-background-bg-*value using the hex values inpackages/ui/src/v2/styles/colors.css; the resulting ratios are documented in the commit message.Screenshots / recordings
Not available from this environment (see above) — manual check requested from @alltomatos.
Checklist