@@ -2908,38 +2908,52 @@ Flex Container Intrinsic Main Sizes</h4>
2908
2908
For each <a>flex item</a> ,
2909
2909
subtract its outer <a>flex base size</a> from its [[#intrinsic-item-contributions|max-content contribution]] size.
2910
2910
If that result is positive,
2911
- divide by its <a>flex grow factor</a> floored at 1 ;
2911
+ divide by its <a>flex grow factor</a> ;
2912
2912
if negative,
2913
- divide by its <a>scaled flex shrink factor</a>
2914
- having floored the <a>flex shrink factor</a> at 1.
2915
- This is the item's <var> max-content flex fraction</var> .
2913
+ divide by its <a>scaled flex shrink factor</a> .
2914
+ This is the item's <var> desired flex fraction</var> .
2916
2915
2917
2916
<li>
2918
2917
Place all <a>flex items</a> into lines of infinite length.
2919
-
2920
- <li>
2921
2918
Within each line,
2922
- find the largest <var> max-content flex fraction</var>
2919
+ find the greatest (most positive)
2920
+ <var> desired flex fraction</var>
2923
2921
among all the <a>flex items</a> .
2922
+ This is the line’s <var> chosen flex fraction</var> .
2923
+
2924
+ <li>
2925
+ If the sum of the line’s <a>flex grow factors</a>
2926
+ (<a>flex shrink factors</a> ,
2927
+ if the <var> chosen flex fraction</var> is negative)
2928
+ is less than 1,
2929
+ multiply the <var> chosen flex fraction</var> by that sum.
2930
+
2931
+ <li>
2924
2932
Add each item’s <a>flex base size</a>
2925
2933
to the product of its <a>flex grow factor</a>
2926
- (or <a>scaled flex shrink factor</a> , if the chosen <var> max-content flex fraction </var> was negative )
2927
- and the chosen <var> max-content flex fraction</var> ,
2934
+ (<a>scaled flex shrink factor</a> , if shrinking )
2935
+ and the <var> chosen flex fraction</var> ,
2928
2936
then clamp that result by the <a>max main size</a>
2929
2937
floored by the <a>min main size</a> .
2930
2938
2931
2939
<li>
2932
- The <a>flex container</a> ’s <a>max-content size</a> is the
2933
- largest sum of the afore-calculated sizes of all items within a single line.
2940
+ The <a>flex container</a> ’s <a>max-content size</a> is
2941
+ the largest sum (among all the lines)
2942
+ of the afore-calculated sizes of all items within a single line.
2934
2943
</ol>
2935
2944
2936
2945
The <strong> <a>min-content</a> <a>main size</a> </strong> of a <em> <a>single-line</a> </em> flex container
2937
2946
is calculated identically to the <a>max-content</a> <a>main size</a> ,
2938
2947
except that the <a>flex items</a> ’ [[#intrinsic-item-contributions|min-content contributions]] are used
2939
2948
instead of their [[#intrinsic-item-contributions|max-content contributions]] .
2949
+
2940
2950
However, for a <em> <a>multi-line</a> </em> container,
2941
- it is simply the largest [[#intrinsic-item-contributions|min-content contribution]]
2951
+ the [=min-content=] [=main size=] is simply the largest [[#intrinsic-item-contributions|min-content contribution]]
2942
2952
of all the non-[=collapsed=] <a>flex items</a> in the <a>flex container</a> .
2953
+ For this purpose,
2954
+ each item's contribution
2955
+ is capped by the item’s [=flex base size=] if the item is not growable,
2956
+ and floored by the item’s [=flex base size=] if the item is not shrinkable.
2943
2957
2944
2958
<details class=note>
2945
2959
<summary> Implications of this algorithm when the sum of flex is less than 1</summary>
@@ -3008,17 +3022,13 @@ Flex Item Intrinsic Size Contributions</h4>
3008
3022
is the larger of its <em> outer</em> <a>min-content size</a>
3009
3023
and outer <a>preferred size</a>
3010
3024
if that is not ''width/auto'' ,
3011
- clamped by its <a>flex base size</a> as a maximum (if it is not growable)
3012
- and/or as a minimum (if it is not shrinkable),
3013
- and then further clamped by its <a lt="min main size">min</a> /<a>max main size</a> .
3025
+ clamped by its <a lt="min main size">min</a> /<a>max main size</a> .
3014
3026
3015
3027
The <strong> main-size <a>max-content contribution</a> of a <a>flex item</a> </strong>
3016
3028
is the larger of its <em> outer</em> <a>max-content size</a>
3017
3029
and outer <a>preferred size</a>
3018
3030
if that is not ''width/auto'' ,
3019
- clamped by its <a>flex base size</a> as a maximum (if it is not growable)
3020
- and/or as a minimum (if it is not shrinkable),
3021
- and then further clamped by its <a lt="min main size">min</a> /<a>max main size</a> .
3031
+ clamped by its <a lt="min main size">min</a> /<a>max main size</a> .
3022
3032
3023
3033
<!--
3024
3034
████████ ████████ ███ ██████ ██ ██ ████████ ██ ██ ████████ ████ ██ ██ ██████
0 commit comments