Skip to content

Set a page of parts' header text from a fact only core reads, and take --lf-holds-parts out of the references - #7070

Merged
max-sixty merged 3 commits into
mainfrom
parts-header-by-width
Nov 27, 2026
Merged

max-sixty merged 3 commits into
mainfrom
parts-header-by-width

Conversation

@max-sixty

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

Copy link
Copy Markdown
Owner

#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

…-holds-parts out of the references

#7058 set the column's header text from the reading theme by asking main's
--lf-holds-parts, and declared that property in packages.md so the theme
could read it. That made a fact of one page shape part of the interface every
package may rely on, where browser/AGENTS.md already says a width needs no
token: a size query on the reader's container answers it.

The header is now an inline-size container where layouts.css fixes it in the
column, and the reading face sets prose in a box under 15rem wide at t-5/1.45
and an h1 there at t-3/1.25. The face's layer lets an eyebrow, a caption or a
chip keep the size it sets for itself by specificity, which the theme's
unlayered rule could not. A lede in such a box reverts to the face's size for
the prose around it (revert-layer), or to the browser's on a page without the
face. A page's own box that narrow gets the same. The reading theme no longer
names a page of parts, nothing reads --lf-parts-title as a property, and
packages.md keeps --lf-parts-title only as the anchor name tabs.css reads.

Behaviour that changed: at phone width the header stacks full width, so its
text takes the page's sizes again (h1 31px, lede 20px, a paragraph 17px),
where #7058 had set them at the column's (20px, 14px, 14px).

Probed the sparkjoy page with an eyebrow, a lede, a paragraph and a tag, and a
126-word lede, against main at 1280x720 and 1440x900 in Chromium and Firefox:
every computed size and the header and list heights are equal on both arms.
Ran test_theme_tokens.py, test_interact_layer.py, test_interact_document.py,
the three page-of-parts tests in tests/browser/widgets/test_tabs.py and the
page-of-parts test in tests/browser/test_render_pages.py.

> _This was written by Claude Code on behalf of max-sixty_
leaf-agent
leaf-agent previously approved these changes Nov 24, 2026
…'s width

The header heads the column and shares the column's height with the list of
parts, so its text is set small for that reason, not for being narrow. The
size query on boxes under 15rem also reached a three-card options row in a
reading column (207px of text per card, against the header's 200px), whose
paragraphs fell from 17px to 14px beside a two-card row at 17px, and
root-parts' 226px Workbench queue pane. No width parts the header from those.

layouts.css again marks the header `--lf-parts-title: 1`, which inherits, and
the reading face's narrow rule and the lede idiom ask that by a style query.
The header is no longer a size container. Only core reads the property;
packages.md keeps `--lf-parts-title` only as the anchor name tabs.css reads.

Against this branch's parent (#7058's rules): review-parts and root-parts at
1440x900, 390x844 and 1280x720 in Chromium and Firefox show no pixel change;
the header and hgroup boxes compute 17px where they computed 14px, and every
element in them sets its own size. Three cards across keep 17px, and the
Workbench pane's list and paragraph keep 17px, in both engines. On the
sparkjoy copy (78- and 126-word ledes) at 1280x720, 1440x900 and 390x844 in
both engines, header height, list room and the h1, lede, paragraph, eyebrow
and tag sizes are equal. Ran test_theme_tokens.py, test_interact_layer.py
and test_interact_document.py.

> _This was written by Claude Code on behalf of max-sixty_
@max-sixty max-sixty changed the title Set a page of parts' header text by the header's width, and take --lf-holds-parts out of the references Set a page of parts' header text from a fact only core reads, and take --lf-holds-parts out of the references Nov 24, 2026
leaf-agent
leaf-agent previously approved these changes Nov 24, 2026
max-sixty added a commit that referenced this pull request Nov 24, 2026
… Layout

`parts-in-layout` is advice, not a refusal (#6641): a `main` that carries a
Layout may hold parts, and they draw as a strip of tabs inside that Layout.
The previous commit dropped layouts.css's guards on that premise and is
reverted, and tabs.css's `body > main > lf-parts` root had dropped the
package's guard the same way, so on such a page the list drew as a centred
column of names with a rule beside the part (720x188 where #7070 draws a
720x47 row, Chromium and Firefox).

The parts' holder now asks its `main` whether it carries a Layout, by the
declared `--lf-layout-box`, which doesn't inherit, so only `main`'s children
can ask. Where it carries none, the holder sets `--lf-parts-column: 1`, the
package's own, and the list's look, the parts' rule and the holder's ::before
ask that, since a style query asks only an element's parent or, for a
pseudo-element, its originating element (probed in both engines). No rule in
the package names a Layout, and packages.md gains no name. The property
starts with `--lf-` as every property a shipped sheet declares must
(test_every_property_leaf_declares_is_named_as_leaf_s); only the package
names it, so it is the package's own.

Parts in a `main class="layout-column"` (root-parts' markup) draw a 720x47
strip at 1440x900 and a 342x47 strip at 390x844, as on #7070, in Chromium and
Firefox. review-parts and root-parts at 1440x900, 390x844 and 1280x720 in
both engines are unchanged against #7070 in pixels and computed styles.
test_interact_layer.py, test_theme_tokens.py and test_interact_document.py:
408 passed.

> _This was written by Claude Code on behalf of max-sixty_
Comment on lines +613 to +614
* names, and its title at a section heading's. An eyebrow, a caption or a chip keeps
* the size it sets for itself, by its rule's weight in this layer. The Layout's

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An eyebrow keeps its size because of its layer, not its weight. The page's own sheet, lf-idioms and a theme's rules all outrank lf-reading-face whatever their weight (this file's header: "Every other rule of the tier outranks them whatever its weight"), and no eyebrow rule stands in this layer. As written, the comment tells the next reader that a heavier selector inside the face is what protects an eyebrow.

Suggested change
* names, and its title at a section heading's. An eyebrow, a caption or a chip keeps
* the size it sets for itself, by its rule's weight in this layer. The Layout's
* names, and its title at a section heading's. An eyebrow, a caption or a chip keeps
* the size it sets for itself, since any rule outside this layer outranks the face's. The Layout's

@max-sixty
max-sixty merged commit 4fe5347 into main Nov 27, 2026
7 checks passed
@max-sixty
max-sixty deleted the parts-header-by-width branch November 27, 2026 18:23
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