Repository navigation
Retire layout-wide; a table granted room keeps its columns' natural width - #2529
Merged
Merged
Conversation
…idth Max chose to simplify the page Layouts rather than add a width setting. Every document page is now a column page, and wide content breaks out of the column by its own declaration. ## What changed - **Page Layouts.** `layout-wide` is gone. `layout-column`, `layout-sidebar` and `layout-workspace` shape `main` alone; their rules in `layouts.css` now say `main.`. `layout-tiles` arranges any block. The unused options are deleted: `main.layout-tiles` (no wide-page frame), `layout-sidebar` and `layout-column` on a block, and `data-width="column"` (`data-width` takes `wide` or `available`; `x-space: column` stays). - **Validator.** `page check` advises when `main` has no page Layout and when a page Layout sits on another box, naming the three page Layouts. - **Tables.** A table given `data-width` keeps the allocation as its box, with its containment and scrolling, but its grid keeps the columns' natural width and stands centred in the allocation (`justify-items: safe center`), so on a column page it is centred on the prose axis. A grid narrower than the column takes the column's width and starts where the prose does. With a sidebar in the left margin the grid starts at the prose and grows right; nested in another breakout it starts at its holder; in a frame it fills the frame as before. A scrolling table's caption now sticks to its inline start, so it stays in view in RTL. - **Examples.** code-comparison, data-explorer and playwright-trace-gallery become column pages; their Asks and trace already declare `available`. file-editor's `lf-file-editor` gains `data-width="available"` on the page, since how wide an editor should be depends on the file it holds. The feature gallery drops its two no-op `data-width="column"`. The corpus is regenerated. - **Instructions and docs.** page-authoring.md's "Layouts", "A sidebar page" (was "A wide page") and "Bounds and widths", the playground's author.md, authoring-questions.md, packages.md, SKILL.md, the registry's `x-space` contract and panel entry, the glossary, How it works and the registry page follow. - **Evals.** `wide-page-ask-grants-its-evidence-room` becomes `sidebar-page-ask-grants-its-evidence-room` (a sidebar page is now the flow where an Ask keeps the measure); `playground-ask-takes-the-room` leaves the Layout to the agent; `page-arrangement-uses-layouts` and `playground-candidates-line-up` drop `layout-wide`. - **Browser support.** notes/browser-support.md records that Firefox 155 does not align in block layout, so it starts the grid at the allocation's edge, where the stretched grid started before. ## Behaviour that changed - The four examples' titles and prose sit in the 720px column; their breakouts take 1392px at 1440px, up from 1325px. Their titles lose the wide page's larger size. - A wide table no longer spreads across 1080px or the whole room: an eight-column table stands at its natural 845px, centred on the prose. - Tests that used `layout="wide"` now use a sidebar page holding one body, which is the same frame; the trace and visual-review tests use column pages as their examples do. The framed-tables gate test asserts that a table granted its own room starts at the prose rather than filling it. The column-beside-sidenote test uses a callout, which declares the column. The data-width="column" assertions for a board and a sample are removed with the value. ## Evals Claude Code, base vs candidate, 2 repeats each: sidebar-page-ask 2/2 vs 2/2, playground-ask 2/2 vs 2/2 (candidate wrote `layout-column` with the Ask `available`; base wrote the removed `layout-wide`), page-arrangement 2/2 vs 2/2. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts: # skills/leaf/assets/registry.json
# Conflicts: # skills/leaf/scripts/leaf/validation/markup.py # tests/test_interact_contract.py
…idth
Max chose to simplify the page Layouts rather than add a width setting.
Every document page is now a column page, and wide content breaks out of
the column by its own declaration.
## What changed
- **Page Layouts.** `layout-wide` is gone. `layout-column`,
`layout-sidebar` and `layout-workspace` shape `main` alone, and their
rules in `layouts.css` now say `main.`. `layout-tiles` arranges any block.
The unused options are deleted: `main.layout-tiles` (no wide-page frame),
`layout-sidebar` and `layout-column` on a block, and `data-width="column"`.
`data-width` takes `wide` or `available`; `x-space: column` stays, for
flows wider than the column such as a sidebar page's body or a workspace
pane.
- **Tables.** A table given `data-width` keeps the allocation as its box,
with its containment and scrolling, but its grid keeps the columns'
natural width and stands centred on the prose axis
(`justify-items: safe center`). Where the margins are uneven, beside a
contents map's spine or a column moved over for a sidenote, the box pads
its wider side by the difference so the centre stays on the axis; a grid
wider than that even span wraps or scrolls sooner by the difference (48px
beside a map at 1440px). A grid narrower than the column takes the
column's width and starts where the prose does. With a sidebar in the
left margin the grid starts at the prose and grows right; nested in
another breakout it starts at its holder; in a frame it fills the frame as
before. A scrolling table's caption sticks to its inline start, so it
stays in view in RTL.
- **Surfaces carry their width.** A playground's grid box states the room's
width (`--lf-breakout-width`, as `lf-sample` does), so `data-width` on the
`lf-playground` widens it. The playground examples put the width on the
playground and on the code reader sample rather than on the `lf-ask` or
section around them, so the Question's heading and premise stay in the
column with the page's title.
- **Examples.** code-comparison, data-explorer and playwright-trace-gallery
become column pages. file-editor's `lf-file-editor` gains
`data-width="available"` on the page, since how wide an editor should be
depends on the file it holds. notification-playground moves its width to
the playground. The feature gallery drops two no-op
`data-width="column"`. A main fixture, playwright-paired-results, becomes a
column page. The corpus is regenerated.
- **Instructions and docs.** page-authoring.md ("Layouts", "A sidebar page",
formerly "A wide page", and "Bounds and widths"), the playground's
author.md, authoring-questions.md, packages.md, SKILL.md, the registry's
`x-space` contract and its callout and panel entries, the glossary, How it
works and the registry page follow.
- **Evals.** `wide-page-ask-grants-its-evidence-room` becomes
`sidebar-page-ask-grants-its-evidence-room` (a sidebar page's body is the
flow where an Ask keeps the measure). `playground-ask-takes-the-room`
becomes `playground-takes-the-room`: it leaves the Layout to the agent and
asks for the width on the `lf-playground`. `page-arrangement-uses-layouts`
requires `layout-sidebar` on `main`; `playground-candidates-line-up` drops
`layout-wide`.
- **Tests.** `leaf_page` refuses a Layout other than column, sidebar,
workspace or none. Fixtures that used `layout="wide"` use a sidebar page
holding one body, the same frame, or a column page where the widget
declares its own width. `test_a_table_granted_room_stands_on_the_prose_axis`
covers even margins, a map, a sidenote and a margin sidebar; it fails
without the padding on the map and sidenote cases.
- **Browser support.** notes/browser-support.md records that Firefox 155 and
WebKit 26.6 do not align an anonymous table in block layout: they start
the grid at the allocation's left edge, 180px (`wide`) or 336px
(`available`) left of the prose at 1440px, with the unused room on the
right; Firefox also leaves a narrow table at its natural width.
## Behaviour that changed
- The four examples' titles and prose sit in the 720px column, and their
titles lose the wide page's larger size. Their breakouts take 1392px at
1440px, up from 1325px.
- A wide table no longer spreads across 1080px or the whole room: an
eight-column table stands at its natural 845px on the prose axis.
- The framed-tables gate test asserts that a table granted its own room
starts at the prose rather than filling it. The column-beside-sidenote test
uses a callout, which declares the column. The `data-width="column"`
assertions for a board and a sample go with the value.
## Evals
Claude Code, base vs candidate:
- `sidebar-page-ask-grants-its-evidence-room` 2/2 vs 2/2,
`page-arrangement-uses-layouts` 2/2 vs 2/2 (on the earlier rubric).
- `playground-takes-the-room` 0/2 vs 2/2: base granted the `lf-ask` on a
`layout-wide` page; the candidate wrote `layout-column` with the room on
the `lf-playground`.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts: # skills/leaf/assets/registry.json
leaf-agent
reviewed
Oct 12, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
The sidebar table rule also needs an RTL placement. With dir="rtl" and a margin sidebar, the new table case puts the narrow grid at x=696–1416 while the prose spans x=360–1080 at 1440px; the grid's inline start is 336px past the prose's. The wide grid ends at x=1416 too. The sidebar override in layouts.css drops the balancing padding and aligns the grid to the breakout box's inline start, but that box extends to the physical right of the prose in this posture. Please make the sidebar placement follow the prose axis in RTL as well, and cover that direction in the table geometry test.
…on the prose axis Aligning the anonymous table grid inside an allocation-wide box is Chrome's alone: Firefox 155 and WebKit 26.6 left the grid at the box's left edge, 180px (wide) or 336px (available) left of the prose. The table's own box now takes its columns' natural width, at least its holder's and at most an even span about the holder's axis, and a 50% margin with a -50% translation puts its centre on the holder's centre. A margin sidebar starts it at the prose. The even span replaces the padding that evened uneven margins, and the column-width caption that held narrow grids is gone: a narrow table keeps its natural width at the prose's start, as a bare one does. The browser-support note for the alignment gap is removed with the gap. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…d its caption to its box, and leave nested tables to their holder In a right-to-left page a box wider than its holder is over-constrained, and the browser keeps the margin at the inline start (the right), so the physical margin-left the placement used was dropped and the table stood up to 237px off the page. The margin is now margin-inline-start, and the translation's sign follows the direction; a margin sidebar stays on the left in both directions, so there the table starts at the prose's left edge, translated over by its width beyond the column in RTL. A table that no longer contains its own width is not the container its caption reads, so the caption is held to the widest the box can be (--lf-table-span); on a phone a long caption stayed 48px past the scrollport. A table inside another breakout set --lf-room on itself, which the style query never reads, so the exclusion is now in the selector. test_a_table_granted_room_stands_on_the_prose_axis runs right to left too, and test_a_scrolling_breakout_table_keeps_its_caption_in_its_scrollport holds the caption at both ends of a phone's scroll. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A list item or a description is narrower than the column the natural-width placement measures from (--lf-width): at 390px a captioned eight-column table in an ol > li had a 48..366 scrollport and a caption running to 390. A table in one now keeps the allocation as its box, with its containment, and fills it as on main; the rest of the placement is unchanged. The shared stylesheet is rebuilt with build:browser, which now owns the style build, so this also carries reading.css's fill rule into shadow.css. test_a_scrolling_breakout_table_keeps_its_caption_in_its_scrollport gains the list-item case, which fails without the exclusion. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
previously approved these changes
Oct 12, 2026
The indented holders the placement cannot measure are the ones the theme indents without a frame: a list item, by its list's padding. A quotation is indented too, but it draws a frame (--lf-block-frame: 1), which already holds a table in it, and a description (dd) is not indented, so a table there now takes the placement, centred on its holder. The caption test gains a quotation case. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts: # skills/leaf/assets/registry.json
leaf-agent
approved these changes
Oct 12, 2026
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Max chose to simplify the page Layouts rather than add a width setting.
Every document page is now a column page, and wide content breaks out of
the column by its own declaration.
What changed
layout-wideis gone.layout-column,layout-sidebarandlayout-workspaceshapemainalone, and theirrules in
layouts.cssnow saymain..layout-tilesarranges any block.The unused options are deleted:
main.layout-tiles(no wide-page frame),layout-sidebarandlayout-columnon a block, anddata-width="column".data-widthtakeswideoravailable;x-space: columnstays, forflows wider than the column such as a sidebar page's body or a workspace
pane.
data-widthtakes its columns' natural widthinstead of spreading the room between them: its box is
max-content, atleast its holder's width and at most an even span about the holder's axis.
A margin of half the holder's width at its inline start and a translation
back by half the box's own width put its centre on the holder's centre,
the prose axis in the page's flow; the translation's sign follows the
writing direction, so right-to-left pages place it the same way. Where the
margins are uneven, beside a contents map's spine or a column moved over
for a sidenote, the even span is twice the narrower side's growth, so a
table wider than it wraps or scrolls sooner (48px sooner beside a map at
1440px). One that fits the column starts where the prose starts.
With a sidebar in the left margin it starts at the prose's left edge and
grows right, in either direction. In a frame or inside another breakout it
fills or starts at its holder as before. A list item, which its list's
padding indents from the column this placement measures from, draws no
frame to hold the table, so a table in one keeps the allocation as its box
and fills it as on main; a quotation is indented too, but its frame
already holds the table. Chromium 153, Firefox 155 and
WebKit 26.6 place it identically, left to right and right to left. The
box gives up size containment, so inside a box that sizes itself to its
content, such as a page's grid track, the table can widen it, as a table
without a width of its own can; its caption is held to the widest the box
can be, so on a phone a long caption stays in the scrollport. A scrolling
table's caption sticks to its inline start, so it stays in view in RTL.
width (
--lf-breakout-width, aslf-sampledoes), sodata-widthon thelf-playgroundwidens it. The playground examples put the width on theplayground and on the code reader sample rather than on the
lf-askorsection around them, so the Question's heading and premise stay in the
column with the page's title.
become column pages. file-editor's
lf-file-editorgainsdata-width="available"on the page, since how wide an editor should bedepends on the file it holds. notification-playground moves its width to
the playground. The feature gallery drops two no-op
data-width="column". A main fixture, playwright-paired-results, becomes acolumn page. The corpus is regenerated.
formerly "A wide page", and "Bounds and widths"), the playground's
author.md, authoring-questions.md, packages.md, SKILL.md, the registry's
x-spacecontract and its callout and panel entries, the glossary, How itworks and the registry page follow.
wide-page-ask-grants-its-evidence-roombecomessidebar-page-ask-grants-its-evidence-room(a sidebar page's body is theflow where an Ask keeps the measure).
playground-ask-takes-the-roombecomes
playground-takes-the-room: it leaves the Layout to the agent andasks for the width on the
lf-playground.page-arrangement-uses-layoutsrequires
layout-sidebaronmain;playground-candidates-line-updropslayout-wide.leaf_pagerefuses a Layout other than column, sidebar,workspace or none. Fixtures that used
layout="wide"use a sidebar pageholding one body, the same frame, or a column page where the widget
declares its own width.
test_a_table_granted_room_stands_on_the_prose_axiscovers even margins, a map, a sidenote and a margin sidebar, each left to
right and right to left, and
test_a_scrolling_breakout_table_keeps_its_caption_in_its_scrollportholds a long caption inside a phone's scrollport at both ends of the
scroll, in the page's flow, a list item and a quotation.
Behaviour that changed
titles lose the wide page's larger size. Their breakouts take 1392px at
1440px, up from 1325px.
eight-column table stands at its natural 845px on the prose axis.
starts at the prose rather than filling it. The column-beside-sidenote test
uses a callout, which declares the column. The
data-width="column"assertions for a board and a sample go with the value.
Evals
Claude Code, base vs candidate:
sidebar-page-ask-grants-its-evidence-room2/2 vs 2/2,page-arrangement-uses-layouts2/2 vs 2/2 (on the earlier rubric).playground-takes-the-room0/2 vs 2/2: base granted thelf-askon alayout-widepage; the candidate wrotelayout-columnwith the room onthe
lf-playground.