Skip to content

Pass frame edges through transparent wrappers - #1185

Merged
max-sixty merged 4 commits into
mainfrom
codex/trim-first-ask-heading
Sep 25, 2026
Merged

max-sixty merged 4 commits into
mainfrom
codex/trim-first-ask-heading

Conversation

@max-sixty

@max-sixty max-sixty commented Sep 25, 2026 •

Copy link
Copy Markdown
Owner

Why

The newer shared frame rule on main carries the edge trim through every first or last descendant. That closes the original 48px heading gap through a bare section, but also erases a heading's own 48px margin inside a padded grid section. The render gate still reads only the direct child, so it cannot explain an untrimmed margin passed through a transparent wrapper.

Change

  • Pass non-inherited frame-start and frame-end state only through wrappers declaring --lf-passes-block-edge: 1. Framed edges lose collapsed surplus while padded and grid descendants keep their interior spacing. Remove the single-child tab rule in favor of that shared path.
  • Make the render gate trace collapsible edge paths and name the missing frame or wrapper declaration. Mark the affected authored examples, regression fixtures, and product documents; the published-site browser suite now covers all six product pages alongside the existing example corpus.

Evidence

  • In a matched browser specimen, current main computes 0px above the heading inside a padded grid section; this candidate computes its authored 48px. The original root-tab and heat-loss frame leaks still trim to 0px on this candidate.
  • Final integrated everyday suite: 1,425 passed. Focused browser files: 322 passed. Runtime folds: 125 passed. All six built product pages passed the browser render gate in both color schemes and at both viewport sizes. Pre-commit checks passed.
Current main This PR
Padded section on current main Padded section with preserved spacing

This was written by Codex on behalf of max-sixty

Carry the shared frame trim through explicitly declared transparent wrappers, and make the render gate trace the same collapsible edge. Remove the Ask and root-tab special cases, mark authored edge wrappers in examples and product pages, and cover the built product documents in the browser suite.
leaf-agent
leaf-agent previously approved these changes Sep 25, 2026
…heading

# Conflicts:
#	skills/leaf/assets/theme.css
#	skills/leaf/packages/default/theme.css
@max-sixty
max-sixty merged commit 331930c into main Sep 25, 2026
5 checks passed
@max-sixty
max-sixty deleted the codex/trim-first-ask-heading branch September 25, 2026 20:19
max-sixty added a commit that referenced this pull request Sep 26, 2026
…pper declarations (#1203)

Two simplifications of the page layout model, both agreed on the layout
review page.

## Page tabs are sections of one page

A page tab set rebuilt the 720px column on its header, strip and panel,
discarding `main`'s own width. So `data-width` on `main` half-applied to
a page of tabs: the gutters, title and rail changed while the content
stayed in the column. A sidebar beside the tabs demoted them to a framed
section.

Now the first `lf-tabs` placed directly in `main` is page navigation,
whatever else `main` holds. Its strip and panels are blocks of `main`
and take the page's width, column or wide, and a header or sidebar
stands beside them as on any page. A later or nested set is a framed
tabbed section.

- **Measured:** on a wide page with tabs at 1440px, the panel goes from
720 to 1325px and a `2fr 1fr` side track from 232 to 434px, matching the
same page without tabs.
- **`lf-tabs.js`:** root is "the first `lf-tabs` among main's children",
watched on main's children only. The whole-subtree observer goes.
- **Theme:** the column-rebuilding rules and the hand-built breakout for
a workspace-only tab are gone. A workspace alone in `main`, or alone in
a page tab that ends the page, holds the window under one rule.
- **Validators:** `markup.py` counts a page-navigation block anywhere
directly in `main` as the outline, and `misalignedSplits` reads grids
inside the shown page tab.
- **Corpus:** the generated corpus nests its tab set in a section, so
every panel's controls stay pressable.

## The edge trim needs no wrapper declarations

#1185 made a frame's margin trim pass only through wrappers declaring
`--lf-passes-block-edge`, so 14 examples and docs, three fixtures and
five default-theme widgets carried it. The trim now follows the edge
through each first or last child, as #1178 had it.

- **A box that draws an inset:** it declares its frame
(`--lf-block-frame`), as theme boxes already do. The case #1185
protected, a heading's 48px kept inside an undeclared padded section,
trims to 0 as soon as that section declares its frame.
- **A row that lays its children out side by side:** a flex row or grid
at a frame's edge would otherwise lose only its first item's margin. It
declares `--lf-holds-edge: 1` and the trim stops there. A new gate
reading, `splitEdges`, names a row that splits; no shipped or product
page has one.
- **Cleanup:** `--lf-passes-block-edge` is removed everywhere, and the
corpus is regenerated.

## Tests

- The gallery composition test asserts placement (alone, among other
blocks, nested).
- The inline-tab test nests its set.
- New tests cover a wide page's tabs sharing `main`'s width beside a
sidebar, and a page-tab workspace holding only where the tabs end the
page.
- The frame-edge test asserts the trim through bare, boxless and
padded-grid sections, plus the undeclared-padded-box advice.
- A split-row test covers `--lf-holds-edge`.
- Each new test fails without its change.
- The everyday suite, the runtime folds, and the render gate on all 24
authored pages and fixtures and the six product pages pass.

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

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

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