Repository navigation
Fade a reading region's content at its bottom edge while more is below - #3344
Merged
Merged
Conversation
A bounded reading region with content below its edge wore `data-lf-more-below` (reach.js marks it correctly), but the theme painted it as an inset box shadow, which draws under the box's descendants. A playground preview whose code cards fill it to the edge showed none of it (0 pixels changed by the mark, Chromium and Firefox), and over transparent content it peaked at 12 to 16 of 255 per channel. The block end now fades the content itself, the paint the sideways marks already use. Each axis states its gradient's stops in a non-inheriting custom property and one rule intersects the two gradients, so a box cut both ways fades on both. Focus within lifts the fade on either axis, as it already did across: Tab leaves a playground's radio at its region's bottom edge, where the fade hid it. Behavior change: every registered reading region (panes, playground regions, bounded blocks, tab panels, panel views, the command reference) shows a 24px content fade instead of an inset shadow at its block end. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts: # tests/browser/widgets/test_playgrounds.py
leaf-agent
approved these changes
Oct 20, 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 reading region with more content below its edge now fades that content over its last 24px, the same paint the sideways marks already use. Before, the bottom cue was an inset box shadow, which draws under the box's own children. A playground in a short workspace showed nothing: its preview's code cards cover the shadow completely (0 pixels changed by the mark in Chromium and Firefox), and over the transparent controls and instruction it changed each channel by at most 16 of 255.
reach.jsalready marked these boxes correctly (data-lf-more-below), so the fix is in the paint only (controls.css, regenerated intoshadow.css). Widening the mark to every scroll box was checked and isn't needed: acrossexamples/anddocs/, only one at-rest box (the registry page's contents sidebar at 560px tall) would newly qualify.This reverses #520's rule for the bottom cue. #520 kept the cue "behind descendants rather than an overlay over their words or controls". That placement is why the cue vanished wherever content runs to the edge. The fade puts the bottom cue in the same vocabulary as the sideways marks, whose own record already argues for masking the content over "casting an unexplained shadow behind it". Each axis states its gradient stops in a non-inheriting custom property, and one rule intersects the two, so a box cut both ways fades on both edges and a nested scroller fades only where it is cut itself. Focus inside the box removes the fade on either axis, as it already did sideways: otherwise Tab could leave a control at the bottom edge faded under its own ring.
Gap case. The fade shows only where content reaches the cut. Where the cut falls in a gap between items, the faded band holds nothing, so no cue shows:
retained-quote-touchin the stills had a faint shadow line on main and has none now, and thealert-queuesidebar's cue is weaker. The user chose this over a shade drawn above the content, which shows in every case but covers the edge of words and drew outside an enclosing scroll box when nested.Behavior change: every registered reading region (panes, playground regions, bounded blocks, tab panels, panel views, the command reference) shows a 24px content fade at its bottom edge instead of an inset shadow.
The new test
test_a_short_workspace_shows_more_below_its_playground_regionsopens code-comparison at 1280x560. It checks that the mark visibly changes the bottom band of the preview and the controls, that a radio reached by Tab is not faded, and that the mark clears at the end. It fails on main withAssertionError: preview(leaf-dev bugbackreports it caught). In Firefox and Chromium, that radio now lands in full view with its ring and is not faded.