Repository navigation
fix(theme): media surfaces keep their colors when a bundler lowers light-dark() #10863
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
cixzhang
wants to merge
31
commits into
main
Choose a base branch
from
fix/media-surface-lowered-scheme-tokens
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,736
−16
Draft
Changes from 24 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
8a44474
test(theme): media surfaces keep scheme tokens after light-dark() low…
cixzhang 454fcee
fix(theme): media surfaces re-declare scheme-dependent root tokens
cixzhang 36ce1c4
chore(changeset): media surfaces keep their colors after light-dark()…
cixzhang 70cdb3f
docs(theme-compilation): media surfaces resolve scheme values under t…
cixzhang 02ba71a
Merge remote-tracking branch 'origin/main' into lane2/10863
cixzhang 7224a91
fix(theme): a media surface keeps the root's value for a reference to…
cixzhang 310077e
Merge remote-tracking branch 'origin/main' into lane2/10863
cixzhang e7bec93
fix(theme): media surfaces follow adaptations, and skip references th…
cixzhang c42a7ff
docs(theme-compilation): INV12 covers adaptation queries and referenc…
cixzhang e74628c
Merge remote-tracking branch 'origin/main' into lane2/10863
cixzhang 6e762b4
test(theme): a surface resolves a reference as the root does under tw…
cixzhang b5ccd1d
fix(theme): a surface inherits where overlapping rules resolve a toke…
cixzhang 6df9563
Merge remote-tracking branch 'origin/main' into fix/media-surface-low…
cixzhang 2f9ffd3
test(theme): a surface takes the theme's value for a scheme-independe…
cixzhang 126fdf6
fix(theme): a media surface takes the theme's value for a scheme-inde…
cixzhang 962f6fd
docs(theme): INV12 names which unset token stops a surface re-declara…
cixzhang 23c7625
test(theme): a surface value refers to the root's alias of a token th…
cixzhang 7b23455
fix(theme): a surface refers to the root's alias of a token the theme…
cixzhang b0f094a
test(theme): a root alias reference keeps the call's fallback
cixzhang ae7f6c0
fix(theme): a root alias reference keeps the call's fallback
cixzhang 7848f0f
test(theme): a surface value refers to the root alias of a theme toke…
cixzhang d546cdd
fix(theme): a surface refers to the root alias of a theme token it ca…
cixzhang f4d8e12
test(theme): alias spellings, and references to a token the surface i…
cixzhang 5d26ec4
fix(theme): every reference a surface does not hold goes through the …
cixzhang 4eea7fe
test(theme): a media surface keeps its secondary text and icons under…
cixzhang b7668f9
test(theme): the root-mapping contrast check measures against the sur…
cixzhang dee9f10
docs(changeset): a media surface also ignores a value an app sets on …
cixzhang f3b9c57
docs(theme-compilation): INV12 names a value set on the theme root too
cixzhang 2576aad
Merge remote-tracking branch 'origin/main' into fix/media-surface-low…
cixzhang 13e4ee1
Merge remote-tracking branch 'origin/main' into fix/media-surface-low…
cixzhang 42d7286
fix(theme): a card a dark page flips keeps its own side's values unde…
cixzhang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| '@astryxdesign/core': patch | ||
| --- | ||
|
|
||
| [fix] Media surfaces keep their colors when a bundler lowers `light-dark()`. A bundler that targets older browsers (for example Vite with lightningcss) resolved the theme's scheme-dependent tokens on the theme root, so inside a `MediaTheme` surface accent text, secondary text, borders and backgrounds kept the page's color scheme: in a light page, Neutral's accent text on a dark surface was #1b1b1b. Each media surface now re-declares those tokens so they resolve under its own scheme. CSS that keeps `light-dark()` renders as before, with one exception: a value set for one of those tokens on an element between the theme root and a media surface no longer reaches the surface. | ||
|
astracat-bot[bot] marked this conversation as resolved.
Resolved
astracat-bot[bot] marked this conversation as resolved.
Resolved
astracat-bot[bot] marked this conversation as resolved.
Resolved
astracat-bot[bot] marked this conversation as resolved.
Resolved
astracat-bot[bot] marked this conversation as resolved.
Resolved
|
||
|
|
||
| @cixzhang | ||
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.