Skip to content

feat: extended flex layout - #97

Draft
rauhryan wants to merge 3 commits into
mainfrom
flex-sizing-70-71
Draft

rauhryan wants to merge 3 commits into
mainfrom
flex-sizing-70-71

Conversation

@rauhryan

Copy link
Copy Markdown
Collaborator

What does this PR do?

Adds a slop spike to explore expanding flex sizing options

Closes #70
Closes #71

Type of change

  • Bug fix
  • Feature
  • Refactor (no behavior change)
  • Documentation
  • Performance improvement
  • Tests
  • Chore (dependencies, CI, tooling)

Checklist

  • All tests pass (pnpm test)
  • Files are formatted (pnpm format)
  • I have added/updated tests for my changes (if applicable)
  • I have added a changeset

AI-generated code disclosure

  • This PR includes AI-generated code

@pkg-pr-new

pkg-pr-new Bot commented Jun 15, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@bomb.sh/tty@97

commit: 26ce90b

@github-actions

github-actions Bot commented Jun 15, 2026 •

Copy link
Copy Markdown

Size Increased — +1.4 KB

130.9 KB unpacked

@rauhryan

Copy link
Copy Markdown
Collaborator Author
image

@codspeed

codspeed Bot commented Jun 15, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 10 untouched benchmarks


Comparing flex-sizing-70-71 (26ce90b) with main (628196c)1

Open in CodSpeed

Footnotes

  1. No successful run was found on main (9e6f17b) during the generation of this report, so 628196c was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@rauhryan
rauhryan marked this pull request as ready for review July 15, 2026 15:11
@rauhryan

Copy link
Copy Markdown
Collaborator Author

Note:

this revealed two issues

  1. how should we deal with box-sizing and what happens when the layout engine positions an element on top of the border of a box

  2. it revealed a small gotcha on how clays command order and our cell rendering logic works for text and border glyphs

@rauhryan rauhryan changed the title spike: initial spike for extended flex layout feat: extended flex layout Jul 15, 2026
@cowboyd
cowboyd marked this pull request as draft July 29, 2026 18:32
@bombshell-cooper

Copy link
Copy Markdown
Contributor

Changeset suggestion

This PR changes published packages but has no changeset.

View the proposed changeset
---
---

Adds `layout.alignSelf` and `stretch()` for per-child cross-axis alignment in flex layouts.

`layout.alignSelf` accepts `auto`, `normal`, `stretch`, `center`, `start`, `end`, `flex-start`, and `flex-end`. `auto` (the default) inherits the parent's cross-axis alignment unchanged. `stretch` and `normal` expand auto-like cross sizes to fill the parent's content box; definite sizes (`fixed()`, `percent()`) remain definite. The new `stretch()` sizing helper explicitly fills the cross axis and can be used on either dimension independently of `alignSelf`.

Floating elements and root elements ignore `alignSelf`.

Add this changeset manually

If this draft is correct, react with 🚀 and Cooper will commit it to this branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

💡 Stretch sizing (fill the cross axis) 💡 Per-child align-self

2 participants