Repository navigation
Reserve code block scrollbar clearance before upgrade - #3752
Merged
Merged
Conversation
max-sixty
pushed a commit
that referenced
this pull request
Nov 1, 2026
The default widget-quality check reproduces both first-presentation regressions on main. `lf-code` adds scrollbar clearance in its pre-upgrade padding even though the native `pre::after` already supplies it; removing that duplicate inset keeps the authored and numbered boxes equal. `lf-text-document` gives its caption and pre-upgrade caption pseudo-element the same `--font-small`, so changing the host from source typography to page typography no longer changes the caption's leading. This preserves the scrollbar room intended by #3752 and the authored Markdown preview introduced in #4861. On screen, code loses 8 px of excess room before upgrade; completed code stays the same. Document captions use the interface's small-font leading before and after upgrade; the preview and source viewports keep their existing bounds. The existing default-package quality test failed before and passes after in column and workspace layouts, without changing its findings allowance. Focused wrapping, Markdown/source switching, viewport/scroll retention, and interface-font checks pass. All 737 runtime tests and pre-commit pass. A feature-gallery startup comparison reaches presentation with the same 75 code requests and 71 JavaScript requests; JavaScript bytes are unchanged and CSS is 142 bytes smaller. <details><summary>Visual comparison</summary> The Markdown preview caption changes from inherited 18.4 px leading to the shared 16.675 px small-font leading. Source-capture captions take the same rule; completed code has no pixel difference in the native-code state. Before:  After:  </details> Closes #4948 — automated triage Co-authored-by: leaf-agent <[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.
#3670 made scrollbar clearance part of every code block's first layout, but a numbered
lf-codeblock now grows 8 px when it upgrades. This change gives the clearance one shared CSS value and reserves it in the authored code box, so the numbered rows keep the first box's height. It preserves #3670's always-present scrollbar room.The nightly main CI run reports
keeps-first-boxfindings for thebracket-walkexample in column and workspace layouts. A bisect identified #3670 as the first commit that produces those findings. The selected widget-quality test fails before this change and passes after it. Focused code wrapping and scrollbar checks pass too. Aleaf-dev probe --basecomparison ofpr-walkthroughshows no extra startup requests or JS bytes; the CSS adds 426 bytes before upgrade, and the completed code blocks have the same heights.The nightly run has other independent failures that this PR does not claim to repair.