Repository navigation
Record that no engine anchors from a shadow root to the outer document - #2828
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Oct 14, 2026
max-sixty
added a commit
that referenced
this pull request
Oct 29, 2026
…age its own chips (#4653) Leaf's stylesheets are now named for where they rank, and the default package draws its own chips, so a page with no theme keeps them. A follow-up to #4637, which made the reading look an optional theme and left "theme" naming three different things. ## Names - **Package sheets:** `widgets.css` becomes `defaults.css` (in `lf-base`, below Layouts) and `theme.css` becomes `overrides.css`, in the tier `lf-theme` renamed `lf-overrides` (above Layouts). Each sheet keeps its tier and order, so no page computes a different style. The bundled packages, `docs/package`, `package init`'s scaffold, the composer, `schema.PACKAGE_STYLES`, `packages.md`, `package-themes.md`, `docs/extending.html`, the tests and the `native-package-scopes` eval prompt follow. A package still shipping the old names contributes nothing (AGENTS.md, "Stage"). - **The kernel's sheet:** `browser/theme.css` becomes `browser/base.css`, and the comments that pointed at it follow. The composed page stylesheet keeps its served name, `/theme.css`, as do the examples' own `STEM.page/theme.css` page files. - **One list of the kernel's files:** `schema.KERNEL_FILES` (`KERNEL_STYLES` plus registry and icon) sits beside `PACKAGE_FILES`. The layer check, `layer.input_paths` and the server identity (`runtime_selection.LAYER_SOURCES`) read it instead of `LAYER_TOP_FILES`, the names a composed layer serves. That list had left out `layouts.css` and `state.css`, so an edit to either changed neither what a live preview follows nor the identity that refuses a stale open document. ## Chips The `lf-tally` count and the change counts on a tab or a settled decision wore the reading theme's `.tag`, so with `--no-theme` they drew as bare text. They now wear `.lf-chip`, whose face `packages/default/styles/chip.css` states once beside `lf-option`'s author chips, replacing the copy `options.css` kept. The change-count tint moves there from the kernel, which no longer names a default-package class. With the reading theme, command-hub's tally and option chips compute the same faces as on `main` (`leaf-dev probe --base`). ## Comments - `base.css`'s anonymous important layer no longer claims to outrank every other layer: it names what wins over it, which is `lf-reset`, Web Awesome's `lf-vendor` sublayer and inline importance. - `chrome-guard.css` records what a shadow-root chrome would cost: no engine yet lets a shadow tree's own styles name a document `anchor-name` (the spike, e7745b7, #2828), though a document `::part()` rule setting `position-anchor` anchors in Chromium, Firefox and WebKit today; the direction was set aside in #3579, and #4030 would bring it back. ## Checks Model tests for the layer, themes, documents, revision and module delivery and previews (one failure, `test_preview_file_subscription_follows_atomic_replacements`, which fails on `main` too), and `pnpm run check`. Codex reviewed the rename; its one finding, the eval prompt, is fixed. > _This was written by Claude Code on behalf of max-sixty_
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.
Records a browser gap found while spiking Leaf's chrome into a shadow root: an element inside a shadow root can't anchor to an
anchor-namedeclared in the document in any current engine (Chromium 153 and 155, Firefox 155, WebKit 26.6), though the anchor positioning draft allows it. That leaves every anchored chrome surface at its fallback position, so the chrome stays in light DOM until browsers resolve outer-tree anchor names.