Repository navigation
Stand a block's marks flat inside its top-right corner - #4860
Merged
Merged
Conversation
A code block's Copy, and a draft's toolbar of Edit and Copy, stood with their middle on the box's top border (#3916), so their top half depended on room outside the box. Where something above the box covered or clipped that room, the half was cut: in rust-sort's Source pane, the first listing's Copy showed only its lower half, which read as a Copy sitting just inside the box, while elsewhere it stood over the edge. Both now stand inside the box's top-right corner, 4px from both edges, so whatever shows the box shows them whole. Copy still shows only on hover, keyboard focus or a tap that stands the user on the block; a draft's toolbar also stays while the draft is edited or asks for an edit. While shown, they cover the first line's last words; for a draft's toolbar that includes the line being edited, and a refused save's status widens it over a third of the line. The user chose one seat for both over keeping the edited line clear. This reverses #3916, whose rejected alternative was Copy in the corner wearing the toolbar's face. The toolbar no longer casts a shadow. Its lift came with the border seat, where it rode across the edge between two surfaces; inside the box its hairline ring sets it apart, as common code-copy buttons do. Under a finger a draft's toolbar keeps its seat on the bottom border: it shows there always, and in the corner its finger-wide reach would take every press meant for the end of the first line. The inset is one token, `--lf-block-control-inset`, which a recording's play bar already matched in value (its comment said it stood "inset as Copy is from a code block's corner"); all three now read it. On a narrow page, where a comment's pin stands just above its block's top edge, the border seat's Copy overlapped the pin by 8px; inside the corner it clears it. Tests: the widened-table scroller test and the code-copy journey now hold Copy within 8px inside the block's top and right edges, where they held its middle to the top border.
leaf-agent
approved these changes
Oct 31, 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.
A code block's Copy, and a draft's toolbar of Edit and Copy, stood with their middle on the box's top border (#3916), so their top half depended on room outside the box. Where something above the box covered or clipped that room, the half was cut: in rust-sort's Source pane, the first listing's Copy showed only its lower half, which read as a Copy sitting just inside the box, while elsewhere it stood over the edge. Both now stand inside the box's top-right corner, 4px from both edges, so whatever shows the box shows them whole. Copy still shows only on hover, keyboard focus or a tap that stands the user on the block; a draft's toolbar also stays while the draft is edited or asks for an edit. While shown, they cover the first line's last words; for a draft's toolbar that includes the line being edited, and a refused save's status widens it over a third of the line. The user chose one seat for both over keeping the edited line clear. This reverses #3916, whose rejected alternative was Copy in the corner wearing the toolbar's face.
The toolbar no longer casts a shadow. Its lift came with the border seat, where it rode across the edge between two surfaces; inside the box its hairline ring sets it apart, as common code-copy buttons do.
Under a finger a draft's toolbar keeps its seat on the bottom border: it shows there always, and in the corner its finger-wide reach would take every press meant for the end of the first line.
The inset is one token,
--lf-block-control-inset, which a recording's play bar already matched in value (its comment said it stood "inset as Copy is from a code block's corner"); all three now read it.On a narrow page, where a comment's pin stands just above its block's top edge, the border seat's Copy overlapped the pin by 8px; inside the corner it clears it.
Tests: the widened-table scroller test and the code-copy journey now hold Copy within 8px inside the block's top and right edges, where they held its middle to the top border.