Repository navigation
State each colour's two schemes in one light-dark(), and name the z-index scale - #756
Merged
Merged
Conversation
…ndex scale
Every colour token in theme.css now carries its light and dark values in one
`light-dark()`, so the 29-line `prefers-color-scheme: dark` block is gone and a
token cannot be updated in one scheme and forgotten in the other. `color-scheme:
light dark` on the root was already there to pick the half. The MCP app follows:
it sets `color-scheme` on its shadow host for the host's declared theme, and
`split_theme` and the snapshot's `darkTheme` are gone.
The 24 stacking literals in theme.css and chrome.css read seventeen named
`--lf-z-*` tokens, listed in order in `:root`. The values are unchanged.
The TODO row for ordering the cascade with `@layer` stays open, with what trying
it found: a page's unlayered `<style>` outranks every layered Leaf rule, so a
page `div { position: relative }` moved 53 chrome boxes, and no rung order
keeps the chrome above the page while theme.css and chrome.css keep contesting
each other by specificity.
Co-Authored-By: Claude Opus 5 <[email protected]>
# Conflicts: # TODO.md
leaf-agent
approved these changes
Sep 17, 2026
# Conflicts: # TODO.md
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.
Every colour token in
theme.cssnow states its light and dark values in onelight-dark(), so the 29-lineprefers-color-scheme: darkblock is gone and a token can no longer be changed in one scheme and missed in the other. The root already setcolor-scheme: light dark, which picks the half. The MCP app setscolor-schemeon its shadow host for the host's declared theme, sosplit_themeand the snapshot'sdarkThemego.The 24 stacking literals in
theme.cssandchrome.cssnow read 17 named--lf-z-*tokens, listed in order in:root. The values are unchanged.The
@layerhalf of the TODO row was tried and backed out; the row stays open with the finding. With Leaf's sheets layered, a page's unlayered<style>outranks all of them, so a pagediv { position: relative }moved 53 chrome boxes including the aim (test_render_aim). Givingchrome.cssits own rung also flipped the specificity contests it was written againsttheme.csswith, such as a thread's focus tint.Full suite with
--run-nightlylocally, before merging main: 2691 passed, 4 failed, and all 4 also fail when run on a merge-base worktree:test_a_stale_package_widget_uses_recursive_parent_eligibility,test_the_room_is_measured_after_a_late_rail,test_the_margin_groups_meanings_at_one_destination_without_moving_the_page(repaired on main by #752), andtest_a_current_auxiliary_choice_replaces_a_persisted_tray_during_replay.