Repository navigation
Size a sidebar page's aside with --aside - #4006
Merged
Merged
Conversation
A page sets --aside on its main to a length or a share of the row, and the aside stands that wide beside the body while the body takes the rest. The default, auto, keeps the 2:1 flex shares, so every existing sidebar page lays out as before. Authors read the Layout's CSS to find a rule to override; the reference now names the property. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Oct 25, 2026
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.
A sidebar page's
asidenow takes its width from--aside, which a page sets on itsmainto a length or a share of the row (main { --aside: 20rem; }). In the overnight authoring runs, 9 author samples read Leaf's CSS to find how to size this panel, because the Layout read no property for it: the width came from flex shares (body2 1 30rem, aside1 1 18rem). The--sidebarand--sidebar-maxproperties size a column page's margin sidebar, not this panel.The default,
--aside: auto, keeps those shares. Probes oflive-progressandtriage-boardat 1440, 1000, 820 and 780px wide match the base to the pixel. That includestriage-boardat 1440, where the body's content minimum makes the aside give up width. When a page sets--aside, a style query on the Layout's box switches to a sizing where the aside isflex: 1 1 var(--aside)and the body's grow factor is large enough to take every free pixel. Beside the body, the aside stands exactly as wide as the page set. Stacked, each region still fills its row, and the two stack where the body's 30rem base or its content minimum no longer fits beside the aside. A single basis property could not do this. Changing only the aside's basis while keeping the 2:1 growth barely moves it: a basis of 16rem instead of 18rem narrows the aside at 1440px by 21px, from 466px to 444px. Making the basis the aside's own width, with no switch, kept every default width but stackedtriage-boardat 1440, because flex wrapping reads bases, not final widths.skills/leaf/references/page-layout.md, "A sidebar page", documents the property.test_a_sidebar_pages_aside_takes_the_width_the_page_setschecks the aside at 16rem beside the body, the body taking the rest of the row, and both filling the row once stacked. It fails on the base, where the aside measures 465.6px instead of 256px. Firefox lays out the set width the same way.