Skip to content

Implement §9.9.1. Flex Container Intrinsic Main Sizes#354

Merged
alice-i-cecile merged 19 commits intoDioxusLabs:mainfrom
nicoburns:flex/intrinsic-container-sizing
Feb 7, 2023
Merged

Implement §9.9.1. Flex Container Intrinsic Main Sizes#354
alice-i-cecile merged 19 commits intoDioxusLabs:mainfrom
nicoburns:flex/intrinsic-container-sizing

Conversation

@nicoburns
Copy link
Copy Markdown
Collaborator

Objective

Fixes #353
Constitues half of #351

Changes made

Implements §9.9.1. Flex Container Intrinsic Main Sizes. It may not quite get all of the edge cases (for example I haven't tested decimal flex-grow/flex-shrink values. But it seems to make most common cases work correctly (and is a strict improvement over the previous code).

Notes

It seems to be a mild performance win (~10%) on the flexbox "deep" and "super deep" benchmark, although it causes a ~5% regression on the flexbox "wide" benchmarks. At some point we probably ought to look at optimising the "wide" case, but the "deep" case definitely seems more realistic in real-world usage so I'm quite happy with these numbers.

@nicoburns nicoburns added the bug Something isn't working label Feb 7, 2023
@nicoburns nicoburns added this to the 0.3 "CSS Grid" milestone Feb 7, 2023
Copy link
Copy Markdown
Collaborator

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to see you fixing up some of the old stretch bugs :D

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Combination of flex-direction & height breaks measure function

2 participants