Repository navigation
fix: dark StyleScope solids on a light page; dropdowns open from the field - #543
Merged
lorant-one merged 2 commits intoNov 17, 2026
Merged
Conversation
A dark StyleScope with data-solid="contrast" on a light page kept light's black primary buttons: the page's [data-theme=light] [data-solid] rules matched the scope with the same specificity as its own dark rules and came later. The six brand-solid rules now match under zero-specificity conditions that only the nearest theme-and-solid pair meets, three levels deep, so order no longer decides. The token export splits selector lists at their top-level commas and keeps one entry per pair (it had two identical ones). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01YJHdG7ZbpQS64MtL5PVbT1
The dropdown anchored to the whole trigger, so a Select with a description opened its list under the helper text. It now anchors to the field box (data-surface="field") when the trigger has one, and the brand-solid selector helper writes unquoted attributes so the theme union parity test reads only real values. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01YJHdG7ZbpQS64MtL5PVbT1
This was referenced Nov 17, 2026
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.
Two fixes for 3.0 that are holding rc.0.
1. Brand solids in a nested theme (foundations)
Before: a dark
StyleScopewithsolid: "contrast"on a light page kept light's black primary buttons. The page's[data-theme="light"] [data-solid]rules matched the scope with the same specificity as its own dark rules, and they come later in tokens.css. The color and inverse solids had the same problem, and so did the reverse case (light inside dark). A section without its owndata-solidtook the page's solid in the page's theme. In a browser matrix of themes, solids and brands nested up to three levels, 56 of 128 cases rendered wrong.After: the brand solids follow the nearest
data-themeand the nearestdata-solid, three levels deep, includingdata-theme="invert". All 128 nested cases and 24 invert cases match a standalone page with the same theme and solid. Before this change, 8 of the 24 invert cases matched.How: the six brand-solid rules now match under conditions that weigh nothing and that only the nearest theme-and-solid pair meets. A Sass function writes them. Rule order no longer decides which rule wins. Each block keeps its plain
[data-theme][data-solid]selector, so the token export and the tests still read it. The token export now splits selector lists only at top-level commas. Its output is the same token values, with one entry per theme and solid pair instead of two identical ones. tokens.css grows by about 8 KB before compression.2. Dropdowns on a field with a description (core)
Before: a Select with a
descriptionopened its list below the helper text, because the dropdown anchored to the whole trigger. This was seen in Sigilio's contract form.After: when the trigger has a field box (
data-surface="field"), the dropdown anchors to it, so the list opens right under the field and covers the description. A new test opens the list at 44px from the field; before the fix it opened at 76px.Checks: core tests 4,700 passed. The one failure was the RichTextEditor test, which passes when run on its own; it has failed before only when the full suite runs. Foundations tests 68/68,
check:tokensup to date, tsc clean, lint gate at baseline (116).Generated by Claude Code