Skip to content

Fade a reading region's content at its bottom edge while more is below - #3344

Merged
max-sixty merged 2 commits into
mainfrom
agent-a0469cd969532f1d7
Oct 20, 2026
Merged

max-sixty merged 2 commits into
mainfrom
agent-a0469cd969532f1d7

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

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.js already marked these boxes correctly (data-lf-more-below), so the fix is in the paint only (controls.css, regenerated into shadow.css). Widening the mark to every scroll box was checked and isn't needed: across examples/ and docs/, 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-touch in the stills had a faint shadow line on main and has none now, and the alert-queue sidebar'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_regions opens 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 with AssertionError: preview (leaf-dev bugback reports it caught). In Firefox and Chromium, that radio now lands in full view with its ring and is not faded.

This was written by Claude Code on behalf of max-sixty

max-sixty and others added 2 commits October 19, 2026 19:34
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
@max-sixty
max-sixty merged commit 46264c1 into main Oct 20, 2026
3 checks passed
@max-sixty
max-sixty deleted the agent-a0469cd969532f1d7 branch October 20, 2026 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants