Skip to content

Measure how far a breakout's holder stands in from the column, so it grows about the prose axis - #2553

Merged
max-sixty merged 13 commits into
mainfrom
breakouts-grow-about-prose-axis
Oct 12, 2026
Merged

max-sixty merged 13 commits into
mainfrom
breakouts-grow-about-prose-axis

Conversation

@max-sixty

@max-sixty max-sixty commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

A block that breaks out of the column (data-width="wide"|"available", or a
widget's x-space) grew from its holder: its room and the split between its
two sides were measured against the holder's edges. A holder that stands in
from the column moved it: a wide block three list items deep centred 36px right
of the prose axis, one in a step list 17px, and one in a page's own indented
block 20px, and an available block left the room on the holder's indented
side unused.

What changed

  • Measured, not declared. The runtime's margin pass (prepaint.js,
    residency), which already measures the column before the page paints, now
    also reads, for each breakout in main, how far its holder's content box
    stands in from the column's on each side, and writes that on the breakout as
    --lf-indent-l and --lf-indent-r (registered in layouts.css, not
    inherited). Whatever moved the holder counts: a nested list item, a step
    list's padded items, a list the page resets to no indent (which declares
    nothing), a page's own indented block, or a widget's slot. The pass reads
    every edge before it writes any, so the page is laid out once however many
    breakouts it holds. It reads only what the browser is drawing: a breakout in
    a tab not chosen or a closed disclosure keeps its last reading (one never
    read stands as if its holder were the column), since reading skipped content
    forces its style and layout. A breakout inside another, and every breakout
    on a page whose main requests no column shell (a sidebar or workspace
    Layout, where nothing grows past its holder), carries none.
  • Read where the indent changes. The pass runs during parsing, before
    first paint, on resize, toggles and chrome layout. Two later causes are read
    where they happen, before the frame that shows them paints, rather than on
    the next margin pass, which reads at most once a frame and would leave the
    breakout one frame off (content-layout.js): a breakout a revision or a
    widget inserts, or one a holder reveals (hidden removed, a disclosure
    opened), in the microtask a MutationObserver on main queues; and a holder
    a class or a style pads anew, through one ResizeObserver on every measured
    holder, which re-reads when a holder's width changes and ignores a change of
    height alone. A holder that moves without changing width, as a positioned or
    translated one, keeps its reading until the next pass.
  • The breakout's split. The breakout rule counts the indent as room on
    that side and splits its growth about the prose axis rather than the
    holder's, with neither side's growth below zero, so the box always covers
    its holder. Every breakout kind follows, since this split is the one rule
    they share. At 1440px a wide block stands at 180..1260 and an available one
    at 24..1416 in any holder, as in the page's own flow. On a phone a wide or
    available breakout in a nested list takes the full column (24..366), as the
    room there is the column.
  • Tables. A table granted room that fits its holder stays with it,
    starting where the holder's text starts (432 three lists deep, 394 in a step
    list, 400 in an indented block). One wider than its holder keeps the
    holder's far edge until it is as wide as the column, then stands centred on
    the prose axis, so it covers its holder at every width and never jumps; with
    a sidebar in the left margin it starts at the prose's left edge and grows
    right. Its span and its caption's bound are the column's
    (--lf-table-span), no longer read through 100cqi, which a container
    between the table and the column made the container's width.
  • Deleted. The list-item exception for tables: a table with a width in a
    list item no longer fills its room (reading.css's :not(li table)), and
    layouts.css no longer leaves it out of table placement, since the measured
    indent places it as anywhere else. No kind of holder declares its indent:
    an earlier draft had lists publish theirs from reading.css and shadow.css,
    with an override for ol.steps, and it missed every holder it did not name.
  • Lists. A list indents on its start side (padding-inline-start), so a
    right-to-left list indents on the right rather than taking 24px on the left
    and the browser's 40px on the right; ol.steps resets the same property.

Measured (Chromium, 1440px, prose 360..1080, axis 720)

Main → this change. A wide block's offset of its centre from the axis, an
available block's extent (in the page's flow: 24..1416), an 8-column table's
centre offset, and where a 2-cell table starts:

Holder wide block available block 8-column table 2-cell table
three nested list items +36 → 0 96..1416 → 24..1416 filled 96..1416 → 0 filled → 432 (item's text)
ol.steps item +17 → 0 filled → 394
list reset to no indent 0 → 0 filled → 360
.inset { padding-left: 40px } +20 → 0 64..1416 → 24..1416 400 → 400

The same holds right to left, beside a contents map (available blocks take
the map's room, 72..1416, as in the flow), and with a margin sidebar (the box
starts at the prose's left edge, 360..1416). Exported pages place every case
identically in Chromium 153, Firefox 155 and WebKit 26.6, both directions.

Cost

The margin pass on the corpus page, which holds 35 breakouts and draws none
of them at first, most being in tabs not chosen, timed as
lfInitial.residency() after a style change on body: 8.3 to 8.9ms on main,
8.0 to 8.4ms with this change (medians of 9). Reading skipped content
instead took 119 to 125ms. Over a session of scrolling down
and back, choosing tabs, opening disclosures and keys on the same page, the
pass ran 13 times on main and here, and the indent was read 5 more times on
arrivals and resizes: 2.9ms in all on main, 7.7ms here. On a page where 40
nested breakouts all move, reading before writing takes a pass from 14.5ms to
10.7ms. Startup loads the same requests and bytes, with no layout shifts.

Tests

test_a_breakout_in_an_indented_holder_measures_its_room_from_the_column
replaces the nested-list test: three nested list items, a step list, a reset
list and an author-indented block against a breakout in the page's flow, on
even margins, beside a map, with a margin sidebar and on a phone, in both
directions, with a narrow table staying in its holder. It fails in every case
without the measurement.
test_a_breakout_moved_in_after_load_re_lands_before_it_paints holds every
frame callback and reads in the rendering update that lays out a change: a
breakout inserted a list deeper, and a holder padded by a class and by an
inline style. Each fails without its reading (the insertion without the
microtask read, the padding without the holder observer).

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

max-sixty and others added 2 commits October 12, 2026 01:35
…e prose axis (#78)

A breakout grew from its holder: its surplus and the split between its two
sides were measured against the holder's edges, and the free room beside the
column. A list item starts its list's inset right of the column, so a wide
block three lists deep centred on the item, 36px right of the prose axis, and
an available block left the first 72px of the room unused.

Lists now say how far they indent each item from the column (--lf-indent-l,
--lf-indent-r in reading.css: each item adds its list's inset to what its
list stood at, on its inline-start side). The breakout counts that indent as
room on that side and splits its growth about the prose axis rather than the
holder's: a wide block in any list item stands at 180..1260 at 1440px and an
available one reaches both edges of the room. Every breakout kind follows,
since the split is the one rule they share.

A table granted room now measures from the column the same way: its minimum
and its even span are the column's, and its margin carries it from the
holder's start to the prose axis. That removes the list-item exclusion the
table placement needed, since its caption bound and the right-to-left sidebar
translation measure from the column too; a table that fits the column starts
where the prose starts, in a list as in the page's flow.

Lists indent with padding-inline-start rather than padding-left, so a
right-to-left list indents its items on the right instead of carrying the
theme's 24px on the left and the browser's 40px on the right. ol.steps, which
draws its own markers, sets the inset to 0 rather than overriding the padding.

test_a_breakout_in_nested_list_items_grows_about_the_prose_axis covers a wide
block, an available block, a table and a narrow table three lists deep, in
both directions; it fails on the previous rule.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
leaf-agent previously approved these changes Oct 12, 2026
max-sixty and others added 2 commits October 12, 2026 01:55
…grows about the prose axis (#78)

A block that breaks out of the column (`data-width="wide"|"available"`, or a
widget's `x-space`) grew from its holder: its room and the split between its
two sides were measured against the holder's edges. A holder that stands in
from the column moved it: a wide block three list items deep centred 36px right
of the prose axis, one in a step list 17px, and one in a page's own indented
block 20px, and an `available` block left the room on the holder's indented
side unused.

## What changed

- **Measured, not declared.** The runtime's margin pass (prepaint.js,
  `residency`), which already measures the column before the page paints, now
  also reads, for each breakout in `main`, how far its holder's content box
  stands in from the column's on each side, and writes that on the breakout as
  `--lf-indent-l` and `--lf-indent-r` (registered in layouts.css, not
  inherited). Whatever moved the holder counts: a nested list item, a step
  list's padded items, a list the page resets to no indent (which declares
  nothing), or a page's own indented block. One layout read per breakout, on
  the pass that already reads the column: during parsing, before first paint,
  on resize and toggles, and, through a MutationObserver on the page's `main` in
  content-layout.js, on the frame after a revision or a widget inserts a
  breakout, or a `hidden` attribute changes over one, before that frame
  paints. A holder that is not rendered keeps its last reading; a breakout
  never read stands as if its holder were the column.
- **The breakout's split.** The breakout rule counts the indent as room on
  that side and splits its growth about the prose axis rather than the
  holder's, with neither side's growth below zero, so the box always covers
  its holder. Every breakout kind follows, since this split is the one rule
  they share. At 1440px a wide block stands at 180..1260 and an available one
  at 24..1416 in any holder, as in the page's own flow. On a phone a wide or
  available breakout in a nested list takes the full column (24..366), as the
  room there is the column.
- **Tables.** A table granted room that fits its holder stays with it,
  starting where the holder's text starts (432 three lists deep, 394 in a step
  list, 400 in an indented block). One wider than its holder keeps the
  holder's far edge until it is as wide as the column, then stands centred on
  the prose axis, so it covers its holder at every width and never jumps; with
  a sidebar in the left margin it starts at the prose's left edge and grows
  right. Its span and its caption's bound are the column's
  (`--lf-table-span`), no longer read through `100cqi`, which a container
  between the table and the column made the container's width.
- **Deleted.** The list-item exception for tables: a table with a width in a
  list item no longer fills its room (reading.css's `:not(li table)`), and
  layouts.css no longer leaves it out of table placement, since the measured
  indent places it as anywhere else. No kind of holder declares its indent:
  an earlier draft had lists publish theirs from reading.css and shadow.css,
  with an override for `ol.steps`, and it missed every holder it did not name.
- **Lists.** A list indents on its start side (`padding-inline-start`), so a
  right-to-left list indents on the right rather than taking 24px on the left
  and the browser's 40px on the right; `ol.steps` resets the same property.

## Measured (Chromium, 1440px, prose 360..1080, axis 720)

Main → this change. A wide block's offset of its centre from the axis, an
available block's extent (in the page's flow: 24..1416), an 8-column table's
centre offset, and where a 2-cell table starts:

| Holder | wide block | available block | 8-column table | 2-cell table |
|---|---|---|---|---|
| three nested list items | +36 → 0 | 96..1416 → 24..1416 | filled 96..1416 → 0 | filled → 432 (item's text) |
| `ol.steps` item | +17 → 0 | | | filled → 394 |
| list reset to no indent | 0 → 0 | | | filled → 360 |
| `.inset { padding-left: 40px }` | +20 → 0 | 64..1416 → 24..1416 | | 400 → 400 |

The same holds right to left, beside a contents map (available blocks take
the map's room, 72..1416, as in the flow), and with a margin sidebar (the box
starts at the prose's left edge, 360..1416). Exported pages place every case
identically in Chromium 153, Firefox 155 and WebKit 26.6, both directions.

## Tests

`test_a_breakout_in_an_indented_holder_measures_its_room_from_the_column`
replaces the nested-list test: three nested list items, a step list, a reset
list and an author-indented block against a breakout in the page's flow, on
even margins, beside a map, with a margin sidebar and on a phone, in both
directions, with a narrow table staying in its holder. It fails in every case
without the measurement. A later insertion was checked by inserting a nested
list holding a wide block after startup: the frame that first paints it
already holds it on the axis.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty max-sixty changed the title Measure a breakout in a list item from the column, so it stands on the prose axis Measure how far a breakout's holder stands in from the column, so it grows about the prose axis Oct 12, 2026

@leaf-agent leaf-agent left a comment

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.

A holder's changed inset can leave its breakout placed against an old reading.

…grows about the prose axis (#78)

A block that breaks out of the column (`data-width="wide"|"available"`, or a
widget's `x-space`) grew from its holder: its room and the split between its
two sides were measured against the holder's edges. A holder that stands in
from the column moved it: a wide block three list items deep centred 36px right
of the prose axis, one in a step list 17px, and one in a page's own indented
block 20px, and an `available` block left the room on the holder's indented
side unused.

## What changed

- **Measured, not declared.** The runtime's margin pass (prepaint.js,
  `residency`), which already measures the column before the page paints, now
  also reads, for each breakout in `main`, how far its holder's content box
  stands in from the column's on each side, and writes that on the breakout as
  `--lf-indent-l` and `--lf-indent-r` (registered in layouts.css, not
  inherited). Whatever moved the holder counts: a nested list item, a step
  list's padded items, a list the page resets to no indent (which declares
  nothing), a page's own indented block, or a widget's slot. The pass reads
  every edge before it writes any, so the page is laid out once however many
  breakouts it holds. It reads only what the browser is drawing: a breakout in
  a tab not chosen or a closed disclosure keeps its last reading (one never
  read stands as if its holder were the column), since reading skipped content
  forces its style and layout. A breakout inside another, and every breakout
  on a page whose `main` requests no column shell (a sidebar or workspace
  Layout, where nothing grows past its holder), carries none.
- **Read where the indent changes.** The pass runs during parsing, before
  first paint, on resize, toggles and chrome layout. Two later causes are read
  where they happen, before the frame that shows them paints, rather than on
  the next margin pass, which reads at most once a frame and would leave the
  breakout one frame off (content-layout.js): a breakout a revision or a
  widget inserts, or one a holder reveals (`hidden` removed, a disclosure
  opened), in the microtask a MutationObserver on `main` queues; and a holder
  a class or a style pads anew, through one ResizeObserver on every measured
  holder, which re-reads when a holder's width changes and ignores a change of
  height alone. A holder that moves without changing width, as a positioned or
  translated one, keeps its reading until the next pass.
- **The breakout's split.** The breakout rule counts the indent as room on
  that side and splits its growth about the prose axis rather than the
  holder's, with neither side's growth below zero, so the box always covers
  its holder. Every breakout kind follows, since this split is the one rule
  they share. At 1440px a wide block stands at 180..1260 and an available one
  at 24..1416 in any holder, as in the page's own flow. On a phone a wide or
  available breakout in a nested list takes the full column (24..366), as the
  room there is the column.
- **Tables.** A table granted room that fits its holder stays with it,
  starting where the holder's text starts (432 three lists deep, 394 in a step
  list, 400 in an indented block). One wider than its holder keeps the
  holder's far edge until it is as wide as the column, then stands centred on
  the prose axis, so it covers its holder at every width and never jumps; with
  a sidebar in the left margin it starts at the prose's left edge and grows
  right. Its span and its caption's bound are the column's
  (`--lf-table-span`), no longer read through `100cqi`, which a container
  between the table and the column made the container's width.
- **Deleted.** The list-item exception for tables: a table with a width in a
  list item no longer fills its room (reading.css's `:not(li table)`), and
  layouts.css no longer leaves it out of table placement, since the measured
  indent places it as anywhere else. No kind of holder declares its indent:
  an earlier draft had lists publish theirs from reading.css and shadow.css,
  with an override for `ol.steps`, and it missed every holder it did not name.
- **Lists.** A list indents on its start side (`padding-inline-start`), so a
  right-to-left list indents on the right rather than taking 24px on the left
  and the browser's 40px on the right; `ol.steps` resets the same property.

## Measured (Chromium, 1440px, prose 360..1080, axis 720)

Main → this change. A wide block's offset of its centre from the axis, an
available block's extent (in the page's flow: 24..1416), an 8-column table's
centre offset, and where a 2-cell table starts:

| Holder | wide block | available block | 8-column table | 2-cell table |
|---|---|---|---|---|
| three nested list items | +36 → 0 | 96..1416 → 24..1416 | filled 96..1416 → 0 | filled → 432 (item's text) |
| `ol.steps` item | +17 → 0 | | | filled → 394 |
| list reset to no indent | 0 → 0 | | | filled → 360 |
| `.inset { padding-left: 40px }` | +20 → 0 | 64..1416 → 24..1416 | | 400 → 400 |

The same holds right to left, beside a contents map (available blocks take
the map's room, 72..1416, as in the flow), and with a margin sidebar (the box
starts at the prose's left edge, 360..1416). Exported pages place every case
identically in Chromium 153, Firefox 155 and WebKit 26.6, both directions.

## Cost

The margin pass on the corpus page, which holds 35 breakouts and draws none
of them at first, most being in tabs not chosen, timed as
`lfInitial.residency()` after a style change on `body`: 8.3 to 8.9ms on main,
8.0 to 8.4ms with this change (medians of 9). Reading skipped content
instead took 119 to 125ms. Over a session of scrolling down
and back, choosing tabs, opening disclosures and keys on the same page, the
pass ran 13 times on main and here, and the indent was read 5 more times on
arrivals and resizes: 2.9ms in all on main, 7.7ms here. On a page where 40
nested breakouts all move, reading before writing takes a pass from 14.5ms to
10.7ms. Startup loads the same requests and bytes, with no layout shifts.

## Tests

`test_a_breakout_in_an_indented_holder_measures_its_room_from_the_column`
replaces the nested-list test: three nested list items, a step list, a reset
list and an author-indented block against a breakout in the page's flow, on
even margins, beside a map, with a margin sidebar and on a phone, in both
directions, with a narrow table staying in its holder. It fails in every case
without the measurement.
`test_a_breakout_moved_in_after_load_re_lands_before_it_paints` holds every
frame callback and reads in the rendering update that lays out a change: a
breakout inserted a list deeper, and a holder padded by a class and by an
inline style. Each fails without its reading (the insertion without the
microtask read, the padding without the holder observer).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

@leaf-agent leaf-agent left a comment

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.

Removed holders remain observed across live revisions.

The ResizeObserver that re-reads a breakout's indent when its holder's width
changes kept every holder it had ever observed. A holder a revision removed
stayed a target for as long as the engine kept it, and an attached holder
that no longer held a drawn breakout still delivered resize work. Each
reading now reconciles the observer with the holders it measured: a holder
absent from the reading is unobserved, and one new to it is observed from the
width the reading measured.

The after-load test's insertion case now replaces the list holding the holder
as a revision does, and asserts that the removed holder is no longer watched
and the new one is. It fails without the unobserve.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

@leaf-agent leaf-agent left a comment

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.

Removing a breakout without replacing it still leaves its old holder observed.

max-sixty and others added 4 commits October 12, 2026 03:07
The holder observer was reconciled only after an indent reading, and a
removal that inserts nothing queued none, so a holder removed with its
section stayed a target until its own zero-width report (in Chrome) forced a
full reading. A childList record whose removed nodes hold a breakout now
reconciles the watch in the microtask it queues, without a reading, and the
reconciliation drops any holder the page no longer holds.

The after-load test gains a removal-only case, asserting the removed holder is
unwatched in that microtask, before any rendering update. It fails without the
removal branch.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A removal reconciled the holder watch against the last reading's holders and
dropped only a holder no longer connected, so a holder that stayed while its
breakouts were removed stayed watched. Each reading now records the breakouts
it found in each holder (prepaint.js, `indentHolders`), and the watch keeps a
holder only while it and one of those breakouts are still connected. That
asks no style or layout, so a removal still reconciles without a reading. A
breakout moved to another holder arrives there, which takes a reading.

The after-load test gains the case: the breakouts removed from a holder that
stays, asserted unwatched in the removal's microtask. It fails when the watch
checks only the holder's connection.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

@leaf-agent leaf-agent left a comment

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.

Removing a breakout without a replacement still retains its detached holder in the indent reading.

max-sixty and others added 2 commits October 12, 2026 03:43
Two stores kept holder state and were reconciled by hand: prepaint.js kept
the last reading's holders, with their breakouts, in a module Map, and
content-layout.js kept the widths it watched. Each round of fixes closed one
way a removed node stayed held; the prepaint Map kept a holder and its
breakouts after a removal until some unrelated reading replaced it.

The reading now keeps nothing: `indents()` (and `residency()`, which runs it)
returns the holders it measured with whether anything changed, and
`lfInitial.indentHolders` is deleted. content-layout.js holds the one record,
kept only to watch: each holder with its last width and the breakouts the
reading found in it, held through WeakRefs. A reading replaces the record
with the holders it measured; a removal alone drops, without a reading, each
holder no longer connected or no longer holding one of its breakouts. A
removed holder held a removed breakout, so that removal drops it, and no
breakout is held strongly, so nothing removed stays held.

The after-load test's insertion case now inserts a holder, removes it with
frame callbacks held and no reading after, forces a collection, and asserts
the holder was collected. It fails when the reading keeps its holders. A holder
the page was written with stays held by the authored copy of the document
(prepaint.js, `origins`), on main as here, so the case uses one a revision
brought.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit 0ce794e into main Oct 12, 2026
3 checks passed
@max-sixty
max-sixty deleted the breakouts-grow-about-prose-axis branch October 12, 2026 11:11
max-sixty added a commit that referenced this pull request Oct 12, 2026
… the page's own arrangement (#2635)

A block given `data-width` now breaks out of the prose column only down
a chain of block flow from the column. Where it, or a box between it and
the column, is something the page arranged itself (a grid or flex item,
a table cell, one of a multi-column holder's columns, an inline-block, a
float, a positioned box), it keeps to the box it is laid out in. Inside
such a box the room beside it is the page's own content, such as a
sibling cell's text. A review of #2529 and #2553 as they sit together on
main found these cases; each is a test that fails on main.

- **A table in a page's own grid** (`1fr 1fr`, the table in the right
cell): the table widened its track and crushed the left cell to 30px,
and the page scrolled sideways (scrollWidth 1516 at 1440). Now it stays
in its cell (728..1080) and scrolls its columns there, as before #2529.
- **A wide block that is itself a grid or flex item**: it centred on its
cell and lay across the sibling's text. Now it takes its cell's width.
- **A table whose direction differs from its holder's** (`dir="rtl"`
data in an English page): it landed at 555..1664 and the page overflowed
by 224px. Placement now follows the holder's direction, because the
browser anchors an over-wide box by its holder's.
- **Firefox scrolled sideways**: by 10px at phone width and by 63px at
1440 on a page with an indented table. Firefox counts a translated table
at its untranslated position when it works out what the page can scroll.
The table is now laid out by a margin to the start of its span, and a
translation moves it the rest of the way, so its untranslated box stays
inside the window.
- **A holder moved by something Leaf didn't cause** (a class adding a
margin, a `display: none` class removed): its breakout stayed off the
axis until the next resize. Each breakout is now watched by an
IntersectionObserver rooted at `main`, sized to the breakout's
horizontal extent, which fires when the breakout moves sideways or its
edge moves outward, never on scroll. Leaf's own triggers still correct
its own changes before paint.
- **A block wrapped in a link or span**, such as a chart in a link, is
laid out in the link's holder's flow and breaks out as on main.

`prepaint.js` classifies each breakout once per holder per reading by
walking to `main` and reading `display`, `float`, `position` and the
column properties, skipping `display: contents` and inline wrappers. An
arranged breakout wears the runtime attribute `data-lf-arranged` (a
page-paint attribute, so revision diffs ignore it) and takes `--lf-room:
100%`. The natural-width table rules skip it. This replaces an
end-margin trick and a table carve-out, which this branch tried and
deleted. `page-authoring.md` ("Bounds and widths") says a block the page
places itself stays in the box it is given.

A breakout in a holder that gives it no width (a flex row with no width,
an inline-block, a table cell sized to its content) is as wide as that
box, which can be 0. A plain table there already behaved this way, and
main does the same for blocks.

Leaf's 32 example and docs pages, compared with main at 1440 and 390 and
with every tab and disclosure open: every breakout's geometry and every
page scrollWidth is identical. Six breakouts are now marked arranged
without moving. Firefox and WebKit match Chromium within 1px. Cost on
the corpus is the same number of readings as main, none from scrolling.

Not covered: a holder that switches how it lays out its children (block
to grid) while nothing in it moves or resizes is re-read at the next
margin pass, not at once.

Tests: `test_a_table_granted_room_stands_on_the_prose_axis` (grid cell,
grid item, opposite direction; Firefox and WebKit),
`test_a_breakout_in_an_indented_holder_measures_its_room_from_the_column`
(grid and flex items, inline-block, link, span, multi-column; even and
phone postures in all three engines, both directions), and the new
`test_a_breakout_whose_block_moves_re_lands`.

> _This was written by Claude Code on behalf of max-sixty_

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty added a commit that referenced this pull request Oct 15, 2026
Removes the per-holder ResizeObserver and per-breakout
IntersectionObserver that re-read a breakout's (`data-lf-space`)
placement when page script restyled its holder after load
(`watchHolders`, `watchMoves`, `observeMove`, `releaseHolders` in
`content-layout.js`, and the holder bookkeeping `prepaint.js`'s
`indents` returned for them). They arrived in #2553 and #2635.

What users lose: when page script restyles a breakout's holder after
load, the breakout keeps its last placement until the next resize,
toggle, chrome layout or revision. Indent measurement itself, and
re-reads on insertion or a `hidden`/`open` change, stay.

The re-landing tests go with the watchers except the insert case, kept
as `test_a_breakout_a_revision_inserts_deeper_lands_before_it_paints`.
It fails with the MutationObserver's read disabled. `LeafIndents` in
`runtime-globals.d.ts` now declares only `changed`, and the kernel is
rebuilt.

> _This was written by Claude Code on behalf of max-sixty_

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
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