Skip to content

Record that no engine anchors from a shadow root to the outer document - #2828

Merged
max-sixty merged 1 commit into
mainfrom
web-dev-gaps
Oct 14, 2026
Merged

max-sixty merged 1 commit into
mainfrom
web-dev-gaps

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

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-name declared 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.

This was written by Claude Code on behalf of max-sixty

@max-sixty
max-sixty merged commit e7745b7 into main Oct 14, 2026
3 checks passed
@max-sixty
max-sixty deleted the web-dev-gaps branch October 14, 2026 04:46
max-sixty added a commit that referenced this pull request Oct 28, 2026
The guard's header named what still reaches the chrome but not why a shadow
root, which would stop all of it, isn't used: anchors can't cross into one in
any engine (#2828), and the direction was dropped (#3579).
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_
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants