Repository navigation
fix: hold lf-shot's toolbar row by the shot's full width before upgrade - #6195
Merged
Merged
Conversation
#6191 moved the stage's scrollbar gutter from the placeholder frame onto the empty `lf-shot`, which narrowed the shot's query container by two gutters. On classic-scrollbar hosts a shot 450–480px wide then reserved the narrow toolbar's second row before upgrade and dropped it after. The gutter now sits on a gutter-only `::after` beside the frame in a row, so the frame takes the stage's content width and the container keeps the shot's. Firefox gives a pseudo-element's gutter a classic scrollbar's width even with overlay scrollbars, so there the held frame is about 24px/ratio short. The new test holds the runtime entry and compares each shot's held and drawn heights at 430–640px.
This was referenced Nov 16, 2026
leaf-agent
pushed a commit
that referenced
this pull request
Nov 18, 2026
…Firefox (#6400) Corrects the claim #6195 left in `shot.css`, that Firefox gives a pseudo-element's scrollbar gutter a classic scrollbar's width even where its scrollbars overlay. The shortfall #6195 measured (held frame 12px short, 3px at 640) comes from Playwright: its Firefox, when headless, adds a user-agent sheet with `* { scrollbar-width: none !important }` ([`hidden-scrollbars.css`](https://github.com/microsoft/playwright/blob/main/browser_patches/firefox/juggler/content/hidden-scrollbars.css), loaded in `Juggler.js` when headless). `*` misses pseudo-elements, so the drawn stage gets no gutter while the held `::after` gets the classic 12px a side that headless Linux Firefox reports. Headed Linux Firefox under Xvfb holds exactly with classic bars (24 / 24px gutters) and with overlay bars (0 / 0), as do Chromium on Linux (30 / 30) and every engine on macOS. The comment now states the condition (same computed `scrollbar-width`) and the Playwright case. Only the comment changes. Worth knowing beyond the diff: #6195's note that it regressed Firefox came from the same sheet, so it changed nothing a Firefox reader sees. Windows Firefox is unmeasured. The commit message has the per-engine table. Asked for by max-sixty, who hasn't read it yet. #6195's test passes in Chromium on macOS and Linux; its body, run in Firefox and WebKit on both, gives the numbers above. > _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.
Follow-up to #6191, as max-sixty asked there. Putting the stage's scrollbar gutter on the empty
lf-shotmade its query container two gutters narrower than the drawn shot's. On classic-scrollbar hosts, a shot 450–480px wide reserved the narrow toolbar's second row (~36px) before upgrade and dropped it after. The gutter now sits on a gutter-only::afterplaced beside the frame (::before) in a row. The frame loses the two gutters, andlf-shotkeeps its full width as the container.Held vs drawn height, Chromium on Linux (15px classic gutters), from the new test
test_a_shot_holds_its_drawn_height_on_either_side_of_the_narrow_toolbar:The test fails on main and passes here. The other 17
shottests intest_render_commands.pyandtest_bundled_widgets_meet_the_widget_quality_checks[default]pass.leaf-dev stills --state screenshot-startupis pixel-identical to main at the default window and at 490, 500 and 510px wide.What the maintainer should weigh: Firefox
Firefox gives a pseudo-element's scrollbar gutter a classic scrollbar's width (12px a side) even when its scrollbars overlay. A real element in the same document gets 0, and so does the drawn stage. On Firefox with overlay scrollbars, this PR's held frame is therefore about 24px ÷ ratio short: 12px for the test's 2:1 capture, 3px at 640px, where the height cap applies. Main's CSS is exact in Firefox (measured in Playwright's Firefox), so this PR regresses it there. WebKit is unaffected.
Pure CSS can't avoid this. The only real element is
lf-shot, and a gutter there narrows the container the toolbar's breakpoint reads. CSS can't carry a gutter's width from one box to another. So the choice is between:I've left this unmerged for that call.
How the Firefox behaviour was measured
A probe with
.s { display: flex }, a gutter-only.s::after { overflow: hidden; scrollbar-gutter: stable both-edges }, and a real<i>with the same style. Chromium: both 30px. Firefox:<i>0,::after24px. Overflowauto/scroll,display: inline-block,contain: strictand grid in place of flex all give the same result. Running the new test in Playwright's Firefox, this branch holds 296/306/272.5/277.5/285/365 against a drawn 308/318/284.5/289.5/297/368, and main matches exactly.