Skip to content

Apply a length flex basis in a container sized by its content (#2108) - #60406

Merged
meta-codesync[bot] merged 1 commit into
react:mainfrom
javache:export-D135044797
Nov 30, 2026
Merged

meta-codesync[bot] merged 1 commit into
react:mainfrom
javache:export-D135044797

Conversation

@javache

@javache javache commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

Summary:

  • Apply a length flex basis in a container sized by its content

A flex basis that is a length was used only when the container's main size
was known. In a container sized by its content, such as the row of a
horizontal scroll view, an item with flex-basis: 300px was as wide as
its content instead.

With the WebFlexBasis experimental feature, an item's flex base size in
such a container is its size in the main axis, or its content size, capped
by the flex basis if the item cannot grow and floored by it if the item
cannot shrink. This is the item's max-content contribution
(css-flexbox-1 §9.9.3).

Co-Authored-By: Claude Fable 5.2 noreply@anthropic.com

  • Document the flex basis of items in a container sized by its content

Co-Authored-By: Claude Fable 5.2 noreply@anthropic.com


Reviewed By: javache

Differential Revision: D135044797

…2108)

Summary:
* Apply a length flex basis in a container sized by its content

A flex basis that is a length was used only when the container's main size
was known. In a container sized by its content, such as the row of a
horizontal scroll view, an item with `flex-basis: 300px` was as wide as
its content instead.

With the `WebFlexBasis` experimental feature, an item's flex base size in
such a container is its size in the main axis, or its content size, capped
by the flex basis if the item cannot grow and floored by it if the item
cannot shrink. This is the item's max-content contribution
(css-flexbox-1 §9.9.3).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* Document the flex basis of items in a container sized by its content

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

---------

Reviewed By: javache

Differential Revision: D135044797
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 30, 2026
@meta-codesync

meta-codesync Bot commented Nov 30, 2026

Copy link
Copy Markdown

@javache has exported this pull request. If you are a Meta employee, you can view the originating Diff in D135044797.

@meta-codesync
meta-codesync Bot merged commit ba29f29 into react:main Nov 30, 2026
57 of 66 checks passed
@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @javache in ba29f29

When will my fix make it into a release? | How to file a pick request?

@react-native-bot react-native-bot added the Merged This PR has been merged. label Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants