Skip to content

Test that only a footer after main unpins the contents map's fixed track - #7441

Merged
max-sixty merged 1 commit into
mainfrom
toc-scroll-gap
Nov 27, 2026
Merged

max-sixty merged 1 commit into
mainfrom
toc-scroll-gap

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Adds a test that the contents map's fixed track stays fixed beside an element a browser extension appends to the body, and sticks beside a site footer after main. #7438 dropped the stuck-track test's extension check, since that check guarded the end-room rule it deleted. The same footer-only condition in browser/layouts.css still decides whether the map is fixed, and nothing else tested it. If the condition widened to "anything after main", the maintainer's map would go back to sticky and bouncing in his Firefox, whose extensions append elements to the body.

Test only. It passes in Chromium and Firefox, and it fails on the appended element when the condition is widened to :has(~ *).

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

#7438 removed the stuck-track test's check that an element a browser
extension appends to the body leaves the track where it stands, since
that check guarded the end-room rule it deleted. The same condition
still decides whether the contents map's track is fixed: the map stays
fixed beside an appended element and sticks beside a site footer. A
regression to "anything after main" would leave the maintainer's map
sticky and bouncing in his Firefox, whose 1Password, Readwise, AdBlock
and Surfingkeys each append elements to the body.

The new test reads the track's position alone, beside an appended live
region, and beside a footer after main, in Chromium and Firefox. With
the footer condition widened to `:has(~ *)` it fails on the appended
element.
@max-sixty
max-sixty merged commit ac7b3d8 into main Nov 27, 2026
6 checks passed
@max-sixty
max-sixty deleted the toc-scroll-gap branch November 27, 2026 21:13
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