website: Fall back to primary.background for themes without selection.background - #3242
Merged
Merged
Conversation
…ion.background` Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Follow-up to #3241.
Summary
#3241 mapped the website's
--selectiontoken toselection.background, but only 5 of the 36 bundled themes define that key. The other 31 (Catppuccin, Tokyo Night, Gruvbox, Solarized, Ayu, …) dropped the declaration and fell back to the site default, so every such theme selected text in the same#55a0fcblue (light) or#c2610aorange (dark), whatever its own palette.The token map now accepts an ordered list of sources, and
selectionresolves toselection.background, thenprimary.background. That matches the component theme, which falls back toprimarywhen a theme leavesselection.backgroundunset.Verification
bun run buildandbun run test:seopass. The builttheme-tokens.cssdefines--selectionfor all 36 themes./docs/page with the heading and first paragraph selected.::selectionbackground:--selection::selectionalpha#89b4fa#7aa2f7#d79921#55b4d3selection.background)#D0A21577selection.background)#55A0FC