Repository navigation
fix: stand a clipped target's contour inside its edge - #4297
Merged
Merged
Conversation
The contour a thread draws round its element (`.lf-visual-mark`) stands outside the target at the focus ring's gap. A joined `lf-options` group clips its cells to its frame, so on a cell the clip cut away the contour's sides and left two accent lines above and below the card, across the neighbouring cells, reading as a second border in another colour beside the chosen card's green ring. The painter already measures every box that clips its target. Where one shows the target's edge but not the ring's room beyond it, the contour now takes the band just inside the edge instead, as a control packed into a list insets its own ring. An edge the clip already cuts, as on a target scrolled partly out of its scroller, keeps the contour outside. Adds a test in Chromium and Firefox with a paragraph as the control, and `ship-option-thread-open` stills (light and dark) for the state. Co-Authored-By: Claude Opus 5.5 <[email protected]>
leaf-agent
approved these changes
Oct 26, 2026
max-sixty
added a commit
that referenced
this pull request
Oct 27, 2026
[#4297](#4297) drew the thread contour just inside a target that a clipping box leaves no room around, such as a cell of a joined `lf-options` group. [#4294](#4294) then redrew every rectangular contour as two brackets on `::before` and `::after`, flush outside the target, and removed the outline that the inset rule moved. On a chosen option, the group's frame again cuts away the brackets' sides and leaves their corner stubs sticking out across the frame and the neighbouring options. The inset now moves the brackets. The rule sits with the bracket rule in `browser/styles/chrome.css` and shifts both pseudo-elements one band inside the edge. The painter now measures the band (`--focus-ring-w`) as the room a contour needs, since the brackets no longer stand at the focus ring's gap. `leaf-dev stills --state ship-option-thread-open`: in the before still, the bracket stubs stand outside the chosen cell's corners, over the group frame. In the after still, the brackets sit inside the cell's edge. The dark state changes the same way, and `ship-thread-open`, a heading with room around it, is unchanged. `test_a_contour_stands_inside_a_target_its_clip_leaves_no_room_around` now reads the bracket's outline; it fails with the toggle disabled and passes in Chromium and Firefox. `test_render_aim.py::test_a_shadow_visual_surface_is_clipped_by_its_host` also fails on `main` since #4294 (342 against a limit of 340), with or without this change. > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
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 contour a thread draws round its element (
.lf-visual-mark) stands outside the target at the focus ring's gap. A joinedlf-optionsgroup clips its cells to its frame (overflow: clip), so on an option the clip cut away the contour's sides and left two accent lines above and below the card, across the neighbouring cells. Next to a chosen card's green ring, they read as a second border in a different colour.The painter (
visual-mark-paint.js) already measures every box that clips its target, so it can see when this will happen. Where a clip shows the target's edge but not the ring's room beyond it, the contour now stands just inside the edge, the way a control packed into a list insets its own ring. An edge the clip already cuts, such as on a target scrolled partly out of its scroller, keeps the contour outside.Before / after (
leaf-dev stills --state ship-option-thread-open, a new catalogue state; the dark state changes the same way, andship-thread-open, a heading with room around it, is unchanged):Before: the contour's top and bottom only, the lower line running across the next option. After: one closed contour just inside the chosen cell's edge.
test_a_contour_stands_inside_a_target_its_clip_leaves_no_room_aroundchecks this in Chromium and Firefox, with a paragraph as the control that keeps the contour outside. With the toggle disabled, it fails.