Repository navigation
Guard the chrome's elements only, dropping its pseudo-element parts and the zoom workaround - #4664
Merged
Merged
Conversation
…nd the zoom workaround The 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 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, toggling the guard's selector in place: - Authored CSS of 194 sources (the page directories under ~/.local/state/leaf/pages, examples and docs, those with a <style>) over review-a-plan's chrome: none changes any rendered chrome pseudo-element. Only five have a pseudo-element rule that isn't scoped to the page's own classes, and the one universal rule is `!important`, which the guard never stopped. - Leaf's own rules, no page CSS, across 88 stills states covering the panel, cards, composer, menus, image viewer and command reference: no rendered chrome pseudo-element changes.
# Conflicts: # browser/styles/chrome-guard.css
leaf-agent
approved these changes
Oct 29, 2026
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.
The chrome guard's
::before,::afterand::placeholderparts came with #4480 as parity withpage-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 withzoom: 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*::aftermargin/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_chromeno longer asserts the placeholder case.Measured on 2026-10-28 by toggling the guard's selector in place:
~/.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-dev stillsstates covering the panel, cards, composer, menus, image viewer and command reference.