Repository navigation
Fade the contents map out as one, and give the prose back the moment it hides - #6678
Merged
Merged
Conversation
…it hides Leaving the revealed contents map cut every label at the spine's 40px track on the first frame, while the part inside the track and the paper behind it faded over 240 ms. Measured in Chromium and Firefox, by all three ways out (the pointer leaving, focus leaving, `g` then Escape): the resting `clip-path` returned on frame one, with the labels still at full opacity. In the scrolling outline, the "On this page" label had no transition at all. The clip did two jobs: it hid the resting labels' measure from the pointer, and it cut their paint. Holding the clip until the fade ended fixed the paint but kept the prose from the pointer for 240 ms, so a pointer returning to the prose within the fade reopened the map, and after a brief hover an invisible map took clicks over the prose. Both reviewers found that independently. So the clip goes. The nav takes no pointer at rest and takes it while the map is revealed (`pointer-events`), which switches at once, and opacity alone does the fade. The rows no longer opt out of the pointer, and the links no longer opt back in: the links' z-index already stands them above every row, so the whole map inherits the nav's state. With no clip there is no right-to-left clip rule. One rule now holds every transition of the fade (nav, links and the outline's label), and toc.css's reduced-motion rule goes, since state.css's guard already stops every transition inside `.lf-ui`. The outline hides its scrollbar: without the clip, a classic scrollbar stood at the labels' far edge over the prose at rest. The mask reachScrollers paints at the outline's foot still says it continues. Tests: a new browser test, for the map and the outline, samples every frame of the fade and requires the words to fade at one pace, the prose past the track to take the pointer from the first frame, and a label past the track to show mid-fade. It fails on main (map: the label is cut; outline: the label pops) and on the held-clip version (the prose stays the map's). The journey's check of the links' declared transitions now lists the shared rule's three.
…ding it The previous commit hid the outline's scrollbar outright, since without the clip a classic scrollbar stood over the prose at rest. Its comment said the mask at the outline's foot still showed that the outline continued, but the contents nav never registers for that mask, so a classic-scrollbar reader of a revealed outline had no sign that sections 24 to 80 existed. Found in review. The nav's scrollbar is now clear at rest and takes `--lf-border` as the labels show, through the same 240 ms transition: `scrollbar-color` interpolates in Chromium and Firefox, and mid-fade its alpha matches the labels' opacity (0.409 at 100 ms in both). The journey's check of the labels' declared transitions broke on each change to the fade's rule, since it compared the whole list. It now checks only that opacity has a transition, which is what it protects: the labels fade in.
With the nav taking no pointer at rest, a pointer that landed on the spine in one move and stopped stood on the map's own box. Revealing the map gave the nav the pointer, but Chromium doesn't hit-test a still pointer again after a `pointer-events` change, so the row's link took no hover colour until the pointer moved; Firefox does hit-test again, through a synthesized move that the preview code reads as content arriving under a still pointer, so the link's preview stayed away until the pointer crossed into another row. On main the link took the pointer in the track directly. Found in review. Each link now takes the pointer on a strip from its start to the track's end, which the resting nav doesn't cover. Landing and stopping on a row hovers its link and shows its preview in both engines, as on main, on the map and on the outline, and at rest nothing past the track takes the pointer. The fade test now also requires that a point in the track on a row's line lands on that row's link; it fails without the strip.
… nav alone The link strip subtracted the row's indent, but on the map an indent pads the link's words rather than moving its box, so an indented row's strip ended 10px short of the track's end and a pointer resting there missed its link in Chromium. Only the outline moves its links by the nav's inset and the row's indent, so only the outline's strips subtract them now. Both reviewers found it. The fade's transitions also listed `scrollbar-color` on every link, and since it inherits, revealing an 80-section outline started 83 scrollbar transitions. The nav alone now transitions its background and scrollbar, and the words their colour and opacity. The resting scrollbar colour is the revealed one at zero alpha rather than `transparent`, which Chromium interpolated through near-black on the way in. The test now gives each section a subsection and requires every row whose link starts in the track, at depths 0 and 1, to take a pointer 4px inside the track's end; the map case fails on the previous commit.
leaf-agent
approved these changes
Nov 21, 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.
When the contents map hides, its labels, the paper behind them and the outline's scrollbar now fade out together, and the prose past the spine's track takes the pointer back on the first frame. Before, the resting
clip-pathreturned on the first frame of the fade, so every label was cut at the 40px track while the part inside it faded over 240 ms, by every way out (pointer, focus leaving,gthen Escape). The outline's "On this page" label had no transition at all.The clip did two jobs, gating the pointer and cutting paint, and holding it until the fade ended left an invisible map taking clicks over the prose. So the clip is gone: the nav takes no pointer at rest (
pointer-events), opacity alone fades, and each link keeps a strip from its start to the track's end that takes the pointer at rest, so a pointer that stops on the spine still hovers its row's link (Chromium doesn't re-hit-test a still pointer). Where to look: that strip's width intoc.css, and the outline's scrollbar, now clear at rest and faded in withscrollbar-color.Max asked for this from a live Leaf page; Codex and a fresh Claude reviewer each reviewed every round. A new browser test, for the map and the outline, fails on main.