Repository navigation
fix(theme): dark text and a seed-coloured rest on pale brand seeds (3.1 candidate) - #578
Merged
Merged
Conversation
A pale brandSeed or accentSeed (a lime, a yellow, a pale cyan or mint) got white text on its solids (1.25:1 on #d4f43c), and its resting solid sat on step 400, which the ramp keeps dark, so a lime button turned olive. customSchemeProperties now writes, for a seed whose white text falls below 2.25:1, black on-solid text, a resting solid on the seed itself and a hover a shade darker. Foundations reads those keys with the old steps and white as fallbacks, so built-in palettes and mid-tone seeds are unchanged. A scale that pins 400 or 500 keeps its solids; only the text follows. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016gNJtwouZkoCqJGNXc79pP
27 tasks done
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.
3.1 candidate (plan:
/mnt/project-files/3.0/3-1-plan.md).Problem
Pale
brandSeedoraccentSeedvalues had two problems withsolid: "color":#d4f43c, 1.5:1 on a yellow and 1.8:1 on a pale cyan.The only workaround was overriding
--brand-on-solid-*in custom CSS. Found while building the Databuddy pitch page.Fix
customSchemeProperties, inutils/colorScheme.ts): for a brand or accent seed whose white text falls below 2.25:1, it now writes:#5A93FC, sitting at 2.5 to 3:1), built-in palettes and the neutral scheme are unchanged.theme.scss'sdata-solid="color"blocks read the new--function-<s>-solid-*and--function-<s>-on-solid-*keys, falling back to the old steps and white.function.scssmaps those keys forcustomand sets them toinitialon every built-in palette.SCHEME_STEPS(themeCss) andSTEPS(StyleScope) carry the new keys, so per-theme and nested-theme remaps keep them.once-ui.tokens.jsonis unchanged for built-ins.Before / after
These are token-level swatches: resting and hover, dark and light, for six seeds (lime, yellow, cyan, mint, blue, orange).
The screenshots are in the project files:
databuddy/landing/core-seed-contrast-{before,after}.png.Checks
vitest runpasses (341 files, 4,796 tests) andtsc --noEmitis clean. New tests cover:vitest runpasses (68 tests):var(--x, fallback)--function-*namescheck:tokensandcheck:utilitiesare up to date. Biome is clean on the changed lines.🤖 Generated with Claude Code
https://claude.ai/code/session_016gNJtwouZkoCqJGNXc79pP