diff --git a/css-flexbox-1/Overview.bs b/css-flexbox-1/Overview.bs index 93a2e58e7b6..2d1c45b56e7 100644 --- a/css-flexbox-1/Overview.bs +++ b/css-flexbox-1/Overview.bs @@ -3037,23 +3037,42 @@ Flex Container Intrinsic Cross Sizes of its flex items. For a multi-line flex container, - the min-content/max-content cross size - is the sum of the flex line cross sizes - resulting from sizing the flex container under a cross-axis min-content constraint/max-content constraint (respectively). - However, if the flex container is ''flex-flow: column wrap;'', - then it's sized by first finding the largest - min-content/max-content - cross-size contribution among the flex items (respectively), - then using that size as the available space in the cross axis - for each of the flex items during layout. - - Note: This heuristic for ''column wrap'' flex containers - gives a reasonable approximation of the size that the flex container should be, - with each flex item ending up as min(item’s own max-content, maximum min-content among all items), - and each flex line no larger than its largest flex item. - It's not a perfect fit in some cases, - but doing it completely correct is insanely expensive, - and this works reasonably well. + the behavior depends on whether it's a row or column flexbox: + + : ''flex-direction/row'' [=multi-line=] [=flex container=] [=cross-size=] + :: The min-content/max-content cross size + is the sum of the flex line cross sizes + resulting from sizing the flex container + under a cross-axis min-content constraint/max-content constraint (respectively). + + : ''flex-direction/column'' [=multi-line=] [=flex container=] [=cross-size=] + :: The [=min-content=] [=cross size=] + is the largest [=min-content contribution=] among all of its [=flex items=]. + + Note: This heuristic effectively assumes a single flex line, + in order to guarantee that the [=min-content size=] + is smaller than the [=max-content size=]. + If the flex container has a height constraint, + this will result in overflow, + but if the [=flex container=] is also a [=scroll container=], + it will at least be large enough to fit + any given column entirely within its [=scrollport=]. + + The [=max-content=] [=cross size=] is the sum of the [=flex line=] [=cross sizes=] + resulting from sizing the [=flex container=] + under a cross-axis max-content constraint, + using the largest max-content cross-size contribution among the flex items + as the available space in the cross axis + for each of the flex items during layout. + + Note: This heuristic gives a reasonable approximation + of the size that the flex container should be, + with each [=flex item=] laid out at its [=max-content contribution=] or larger, + and each flex line no larger than its largest flex item. + It's not a perfect fit in some cases, + but doing it completely correct is insanely expensive, + and this works reasonably well. +

Flex Item Intrinsic Size Contributions