Skip to content

Commit 648b3c3

Browse files
committed
[css-flexbox] Rearrange the multi-line cross-size stuff, since there's an uncontroversial answer for row flexboxes.
1 parent 912deef commit 648b3c3

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

css-flexbox/Overview.bs

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2751,7 +2751,16 @@ Intrinsic Sizes</h3>
27512751
The <dfn>min-content cross size</dfn> and <dfn>max-content cross size</dfn> of a <a>single-line</a> <a>flex container</a>
27522752
is the largest <a>min-content contribution</a> or <a>max-content contribution</a> (respectively)
27532753
of its <a>flex items</a>.
2754-
For a <a>multi-line</a> <a>flex container</a>, ...
2754+
For a <a>multi-line</a> <a>flex container</a>,
2755+
the <a>min-content cross size</a>/<a>max-content cross size</a>
2756+
are the sum of the flex line cross sizes
2757+
resulting from sizing the flex container under a <a>cross-axis</a> <a>min-content constraint</a>/<a>max-content constraint</a>, respectively.
2758+
2759+
Issue: Current browsers set the flex container’s inner size
2760+
to the size of the largest min-content contribution,
2761+
instead of summing the lines.
2762+
This is clearly wrong,
2763+
as it is guaranteed to cause overflow if there are multiple lines.
27552764

27562765
<div class="issue">
27572766
In an ideal world, the multi-line cross size would be calculated by, one by one,
@@ -2765,13 +2774,9 @@ Intrinsic Sizes</h3>
27652774
and then shrink-to-fit sizing everything into that much available space.
27662775
Is this approximation sufficiently useful to specify?
27672776
Can we do better?
2768-
2769-
Current browsers also set the *flex container's* inner size to that largest value,
2770-
which is clearly wrong, as it is guaranteed to cause overflow if there are multiple lines.
2771-
We would need to require the cross-size to be the sum of the line's cross sizes
2772-
after doing item layout and linebreaking as outlined above.
27732777
</div>
27742778

2779+
27752780
The <strong>main-size <a lt="min-content contribution">min-content</a>/<a>max-content contribution</a> of a <a>flex item</a></strong>
27762781
is its outer <a lt="min-content size">min-content</a>/<a>max-content size</a>,
27772782
clamped by its <a>flex base size</a> as a maximum (if it is not growable)

0 commit comments

Comments
 (0)