Repository navigation
Restate zoom in the chrome guard so Chrome 155 renders pages at any zoom - #4640
Merged
Merged
Conversation
…any zoom `all: revert-layer` on the floating panel's ::after crashed Chrome 155's renderer whenever page zoom or device scale wasn't 1. No Leaf rule sets zoom, so `zoom: normal` is the value the revert reached; restating it keeps the computed style and avoids the crash. Closes #4536
leaf-agent
approved these changes
Oct 28, 2026
max-sixty
added a commit
that referenced
this pull request
Oct 29, 2026
…nd the zoom workaround (#4664) The chrome guard's `::before`, `::after` and `::placeholder` parts came with #4480 as parity with `page-sheets.js`, which excluded the chrome from every page selector, pseudo-elements included. They were the part that crashed Chrome 155's renderer at any zoom but 100% (#4536), which #4640 worked around with `zoom: normal`. Without them the guard needs no workaround: Chrome for Testing 155.0.8059.79 renders at 0.9, 1.1 and 1.5 with `.lf-chrome, .lf-chrome * { all: revert-layer }`, and still crashes with the pseudo parts kept and the zoom line removed. Behavior that changes: a page rule aimed at a pseudo-element with a bare or universal subject now reaches the chrome, such as `::placeholder { font-style: italic }` on the composer's placeholder, `button::after { content }` on its buttons, or a `*::after` margin/padding reset on its hit areas. Inherited faces still stop, since a pseudo-element inherits from its guarded element. `test_a_pages_light_rules_stop_at_the_chrome` no longer asserts the placeholder case. Measured on 2026-10-28 by toggling the guard's selector in place: - The authored CSS of 194 sources (the page directories under `~/.local/state/leaf/pages`, the examples and the docs, those with a `<style>`), laid over review-a-plan's chrome, changes no rendered chrome pseudo-element. Only five have a pseudo-element rule not scoped to the page's own classes, and the one universal rule is `!important`, which the guard never stopped. - Leaf's own rules, with no page CSS, change no rendered chrome pseudo-element across 88 `leaf-dev stills` states covering the panel, cards, composer, menus, image viewer and command reference. > _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.
Since #4480,
.lf-chrome ::after { all: revert-layer }crashed Chrome's renderer on load whenever page zoom or device scale wasn't 1. The issue narrowed it tozoomandview-timeline-insetboth reverting on the floating panel's::after. No Leaf rule setszoom, sonormalis the value the revert reached anyway; the guard now restateszoom: normalafter the reset, which keeps every computed value and stops the crash.Verified in Chrome for Testing 155.0.8059.79 on macOS, serving
ideas-to-implementwith a profile default zoom: before the change the tab crashed at 0.9, 1.1 and 1.5 and rendered at 1; after it, all four render. Stable Chrome 156.0.8078.49 doesn't crash on either side, so no regression test can see this on current Chrome or in the headless shell the suite uses. The guard's existing tests (test_layout.py -k "stop_at_the_chrome or coined_class") pass.Closes #4536