Skip to content

Set a page of parts' header text at the column's size - #7058

Merged
max-sixty merged 3 commits into
mainfrom
parts-rail-scroll
Nov 24, 2026
Merged

max-sixty merged 3 commits into
mainfrom
parts-rail-scroll

Conversation

@max-sixty

@max-sixty max-sixty commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner

A page of parts puts its header in a 15rem column above the list of parts. The reading theme already set the title there as the column's heading, but the rest of the header kept the part's sizes: a lede at t-3 (20px, about four words to a line) and plain paragraphs at the body's t-4. A typical agent intro then filled the column, scrolled on its own, and left the list its 8rem floor. Now the reading theme sets the header's text at t-5 on the header box, and the lede idiom inherits its box's size inside the column, so a page without the theme gets its header's own size there. An eyebrow and the title keep the sizes they set themselves. The theme finds the header by asking main's --lf-holds-parts, as layouts.css does, so packages.md now declares that fact beside --lf-parts-list: a style query reads a container of the element it styles, so the header's own --lf-parts-title reaches only its children, and a theme that replaces reading needs the same fact to style the header box.

On the page that prompted this (an 86-word lede, three parts), the list went from 128px of its 300px to all of it at 1440×900, and 294 of 300px at 1280×720, in Chromium and Firefox. At 1280×720, a three-part list now stays whole up to about 80 words of header, where it used to be squeezed from about 45; the header scrolls on its own only past about 130 words.

Phones get the smaller header text too, as they already got the column's title size.

Max asked, from a page of parts reviewing sparkjoy's README. Tests: test_interact_layer.py, test_interact_document.py, and the two page-of-parts layout tests in test_tabs.py and test_render_pages.py.

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

max-sixty and others added 2 commits November 24, 2026 11:22
A page of parts stands its header in a 15rem column above the list of
parts. The reading theme already set the title there as the column's
heading (t-3), but the header's other text kept the part's sizes: a lede
at t-3 (20px/30px, about four words to a line in the column's 200px
measure) and plain paragraphs at the body's t-4. On the page that
prompted this (an 86-word lede, three parts), at 1440x900 the header took
772px, scrolled on its own inside that, and left the list its 8rem
floor, 128px for 300px of rows.

The reading theme now sets the header's text at t-5 on the header box
(14px, or 12.5px at working density), and the lede idiom inherits its
box's size in the column instead of setting t-3, so a page without the
theme gets its header's own size there. What sets its own size, such as
an hgroup eyebrow or the title, keeps it.

Same page after: the header takes 426px, and the list shows all three
rows at 1440x900 and 294 of 300px at 1280x720 (Chromium and Firefox).
The root-parts fixture's header goes from 348px to 236px; review-parts
(working density) from 180px to 174px.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
leaf-agent
leaf-agent previously approved these changes Nov 24, 2026
The reading theme now sets a page of parts' header text by asking main's
--lf-holds-parts, and a bundled package may lean only on names a reference
declares (test_a_bundled_package_names_only_the_names_of_leaf_s_its_references_declare).
The header's own --lf-parts-title can't serve: a style query reads a container
of the element it styles, so only the header's children can ask it, and a size
set on each child overrides the sizes an eyebrow or tag sets for itself. The
other way to ask main, a :has() on it, restyles the document on every write
(layouts.css, "A page of parts"). So the fact a theme needs to style the header
box is main's, and a theme replacing reading needs it too.

> _This was written by Claude Code on behalf of max-sixty_
@max-sixty
max-sixty merged commit e432bfa into main Nov 24, 2026
6 checks passed
@max-sixty
max-sixty deleted the parts-rail-scroll branch November 24, 2026 19:56
max-sixty added a commit that referenced this pull request Nov 27, 2026
…e --lf-holds-parts out of the references (#7070)

#7058 set a page of parts' header text from the reading theme by asking
`main`'s `--lf-holds-parts`, and declared that property in `packages.md`
so a theme could read it. That put one page shape's layout into the
interface every package may rely on. Now the kernel's reading face sets
it, by a style query on the `--lf-parts-title: 1` that `layouts.css`
already sets on the header: what the header holds at the list's size
(t-5/1.45), its title at t-3/1.25. An eyebrow and a tag keep their own
sizes. Only core reads the property. The reading theme no longer names a
page of parts, and `packages.md` drops `--lf-holds-parts` and keeps
`--lf-parts-title` only as the anchor name `tabs.css` reads.

To weigh: `reading.css` records the rejected first version, a size query
on boxes under 15rem. Three option cards across a reading column hold
207px of text and the header 200px, so no width separates them. Text
written straight in the header, outside a paragraph, list or heading,
now takes the body's size.

No pixel change on `review-parts` and `root-parts` at 1440×900, 390×844
and 1280×720 in Chromium and Firefox. Header height and type sizes are
equal on a 78-word and a 126-word lede. Tests: `test_theme_tokens.py`,
`test_interact_layer.py`, `test_interact_document.py`.

> _This was written by Claude Code on behalf of max-sixty_
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