Flexbox: use hypothetical main sizes for column intrinsic contributions - #1165
Open
nicoburns wants to merge 3 commits into
Open
Flexbox: use hypothetical main sizes for column intrinsic contributions#1165nicoburns wants to merge 3 commits into
nicoburns wants to merge 3 commits into
Conversation
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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.
Objective
Make column flex container intrinsic main sizing match what browsers actually ship, and replace the misleading comment about the row/column asymmetry with the real explanation.
As established in #351 (comment), browsers use two different item-contribution models depending on the axis:
min-height: auto) are irrelevant.Taffy previously approximated the column behavior with a content-based contribution floored by the flex basis:
This coincides with browsers whenever the automatic minimum size floors the item at its content size, but diverges when it doesn't. Distinguishing case: column container, item with
flex-basis: 200px; min-height: 0, content 300px high — Chrome gives the container height 200, taffy previously gave 300.Context
match, so for column containers the intrinsic pass no longer measures item content at all (the auto minimum size was already computed and cached indetermine_flex_base_size). The row path is unchanged apart from de-nesting the now-row-onlymatch.min-height: 0disabling the auto-min floor (expect 200), the defaultmin-height: autofloor (expect 300), andmax-heightcapping the flex basis (expect 100). All expectations are Chrome-generated.Feedback wanted
hypothetical_inner_sizeas stored bydetermine_flex_base_sizeis not clamped by the stylemaxmain size (only by the resolved minimum and aspect-ratio-transferred sizes), so the column branch applies.maybe_min(style_max)plus a re-floor by the resolved minimum (min wins over max). If that max-clamp should instead live indetermine_flex_base_sizeitself, happy to move it.Link to Devin session: https://dioxus.staging.devinenterprise.com/sessions/f379d8c9a11e428a92fe6198951c5e79
Open in Devin Desktop: https://dioxus.staging.devinenterprise.com/desktop/session/f379d8c9a11e428a92fe6198951c5e79?variant=devin-insiders
Requested by: @nicoburns