[css-flexbox-1] When can available space for flex items be infinite? #6476
Labels
Closed as Question Answered
Used when the issue is more of a question than a problem, and it's been answered.
Commenter Response Pending
css-flexbox-1
Current Work
I’m implementing Step 2: determine the available main and cross space for the flex items, and I’m trying to better understand what constitutes definite and indefinite sizes, and by extension definite and infinite available space.
CSS Box Sizing Level 3 defines definite size as:
It wasn’t clear to me if intrinsic sizes counted as definite, and after some digging found [css-sizing] definite sizes and shrink-wrapping and the WG resolution saying that:
Approaching this from another angle, I tried to think if situations where the available space could possibly be infinite. These are the cases I was able to identify:
block-size
computes toauto
, and the flex container participates in flow layoutblock-size
computes to a<percentage>
, and the containing block’sblock-size
depends on content; this creates a cyclic dependency, so<percentage>
behaves asauto
Interestingly, I wasn’t able to think of one situation where the available space in the inline dimension of the flex container would ever be infinite. Even in orthogonal flows the inline size of the flex container seems to be resolved against a fallback size defined in Available Space in Orthogonal Flows. I was unable to reproduce the case where the flex container would lay its box out at its
max-content
size when given “infinite available inline space” as described in Auto-sizing Other Orthogonal Flow Roots.So I have two questions:
The text was updated successfully, but these errors were encountered: