Skip to content

Centre a sidebar page's prose in the window, clear of its sidebar - #6004

Merged
max-sixty merged 3 commits into
mainfrom
sidebar-column-placement
Nov 15, 2026
Merged

max-sixty merged 3 commits into
mainfrom
sidebar-column-placement

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

A sidebar page's prose now stands where a column page's would: centred in the window, moving right only as far as the sidebar needs. Since #4724 the body started its prose at its own start edge beside the sidebar. Once #5772 narrowed a contents-only sidebar to its 56px spine, that put the prose at x=104 on a 1728px window, with 880px empty past it and the panel centred 400px off it. In Firefox the prose now stands at 504px beside the spine or an outline column at 1728, 360px at 1440 and 280px at 1280, and below about 930px where it did. Pointing at the spine on a wide window shows its titles in the empty margin rather than over the words.

The body pads its start by a new --lf-room-before and splits its room into --lf-free-start and --lf-free-end, so available blocks still reach the whole room and wide grows from the prose. An aside after the body centres the prose short of the aside. Two limits carry over from the room math, which predicts flex geometry from --aside and the gap: a percentage --aside zeroes the room, as before this change, and nested flows written in alternating directions don't grow their box toward a wide block's start side, as on column pages.

Max picked this layout from three drawn candidates. Tests: the spine, outline and other-direction-flow tests assert the centred prose; the sidebar browser tests and the contents journey pass.

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

A sidebar page's `layout-column` body set its prose at its own start edge
(#4724) and gave all the rest of its width to the room at the end. Beside a
240px outline column that put the prose at 288px. Once #5772 narrowed a
contents-only sidebar to its 56px spine, the prose followed it to 104px: at a
1728px window, 880px stood empty past the prose and the panel stood centred
400px right of it.

The body now pads its start by `--lf-room-before`, the part of its room that
centres the prose in the Layout, so the prose stands where a column page's
would and moves toward the end only as far as the sidebar before it needs.
The rest of the room stays at the end, and `--lf-free-start` and
`--lf-free-end` split the room around the prose for breakouts. In Firefox at
1728px the prose moves from 104 to 504px beside the spine and from 288 to
504px beside an outline column; at 1440px it stands at 360px; below about
930px it stands where it did. Pointing at the spine now shows its titles in
the empty margin on a wide window instead of over the words.

Tests that asserted the old placement change with it: the spine test asserts
the prose is centred and the titles lie past the spine's track; the covering
test runs at 960px, where the titles still reach over the body; the contents
journey asserts the narrowed aside and the centred prose; and a flow written
the other way from its page now grows its wide block into the room before the
prose, within the page's room.
The room before the prose counted the aside as standing before the body, so
an aside after it left the prose short of the centre by the aside and the gap:
at 1728px beside a 240px aside after the body, the prose stood at 240px rather
than 504px. A sidebar whose aside follows its body now centres the prose in
the whole Layout, short of the aside. The outline test asserts the prose is
centred with the aside on either side of the body.
@max-sixty
max-sixty merged commit a2773d8 into main Nov 15, 2026
5 checks passed
@max-sixty
max-sixty deleted the sidebar-column-placement branch November 15, 2026 02:10
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