Skip to content

feat: layout.basis — starting main-axis size (px or %) of a child's slot - #42

Merged
eigger merged 2 commits into
mainfrom
feat/layout-basis
Oct 3, 2026
Merged

eigger merged 2 commits into
mainfrom
feat/layout-basis

Conversation

@eigger

@eigger eigger commented Oct 3, 2026

Copy link
Copy Markdown
Owner

Layout UX: grow only shares leftover space, so equal-width columns or fixed fractions needed hand-computed widths. layout.basis (px, numeric string or "N%" of the container's inner size) sets a child's starting slot size; a card (nested stack with background/outline and no main-axis size) is sized to it, other children keep their own size inside a slot of at least that size. basis: 0 + grow: 1 gives equal columns; basis + grow shares what is left. Explicit width/height on the card wins. Bad values raise RenderError at .elements[i].layout.basis. Tests: percent/px/zero+grow/column/plain child/explicit size/invalid; checked visually; suite also run on Pillow 10.4.

🤖 Generated with Claude Code

eigger and others added 2 commits October 3, 2026 10:56
basis sizes a card to px or a percentage of the container's inner size (0 + grow:1 gives
equal-width columns); other children keep their size inside a slot of at least that size.
Invalid values raise a RenderError naming .elements[i].layout.basis.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ocument collapse/clipping

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@eigger
eigger merged commit 6fcc0ee into main Oct 3, 2026
5 checks passed
@eigger
eigger deleted the feat/layout-basis branch October 3, 2026 02:06
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.

1 participant