Repository navigation
Pass frame edges through transparent wrappers - #1185
Merged
Merged
Conversation
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
previously approved these changes
Sep 25, 2026
…heading # Conflicts: # skills/leaf/assets/theme.css # skills/leaf/packages/default/theme.css
leaf-agent
approved these changes
Sep 25, 2026
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]>
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.
Why
The newer shared frame rule on
maincarries 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
--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.Evidence
maincomputes 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.main