@@ -2878,15 +2878,32 @@ Intrinsic Sizes</h3>
2878
2878
Flex Container Intrinsic Main Sizes</h4>
2879
2879
2880
2880
The <strong> <a>max-content</a> <a>main size</a> of a <a>flex container</a> </strong>
2881
- is, fundamentally , the smallest size the <a>flex container</a> can take
2881
+ is, theoretically , the smallest size the <a>flex container</a> can take
2882
2882
such that when flex layout is run with that container size,
2883
2883
each [=flex item=] ends up at least as large as
2884
2884
its [[#intrinsic-item-contributions|max-content contribution]] ,
2885
2885
to the extent allowed by the items’ flexibility.
2886
2886
2887
- It is calculated,
2888
- considering only non-[=collapsed=] [=flex items=] ,
2889
- by:
2887
+ The <strong> [=min-content=] [=main size=] is, theoretically,
2888
+ the smallest size the [=flex container can take=]
2889
+ such that no items overflow it,
2890
+ and no item's contents overflow the item--
2891
+ setting aside the cases in which the boxes layouts are <em> defined</em> to overflow
2892
+ (for example with negative margins or percentage sizes that add up to more than 100%).
2893
+
2894
+ <h5 id='intrinsic-main-sizes-ideal'>
2895
+ Ideal Algorithm</h5>
2896
+
2897
+ Note: The following algorithm calculates the [=flex container=] ’s ideal
2898
+ intrinsic [=main sizes=] .
2899
+ However, because it was not implemented correctly initially,
2900
+ and existing content became dependent on the (unfortunately consistent) incorrect implemented behavior,
2901
+ <a href="https://github.com/w3c/csswg-drafts/issues/8884">it is not Web-compatible</a> .
2902
+ Implementers and the CSS Working Group are investigating to what extent
2903
+ Web browser implementations can safely approach this behavior,
2904
+ and further experimentation is welcome.
2905
+
2906
+ Considering only non-[=collapsed=] [=flex items=] ;
2890
2907
2891
2908
<ol>
2892
2909
<li>
@@ -2940,15 +2957,6 @@ Flex Container Intrinsic Main Sizes</h4>
2940
2957
except that the <a>flex items</a> ’ [[#intrinsic-item-contributions|min-content contributions]] are used
2941
2958
instead of their [[#intrinsic-item-contributions|max-content contributions]] .
2942
2959
2943
- However, for a <em> <a>multi-line</a> </em> container,
2944
- the [=min-content=] [=main size=] is simply the largest [[#intrinsic-item-contributions|min-content contribution]]
2945
- of all the non-[=collapsed=] <a>flex items</a> in the <a>flex container</a> .
2946
- For this purpose,
2947
- each item's contribution
2948
- is capped by the item’s [=flex base size=] if the item is not growable,
2949
- floored by the item’s [=flex base size=] if the item is not shrinkable,
2950
- and then further clamped by the item's min and max main sizes.
2951
-
2952
2960
<details class=note>
2953
2961
<summary> Implications of this algorithm when the sum of flex is less than 1</summary>
2954
2962
@@ -3029,6 +3037,27 @@ Flex Container Intrinsic Main Sizes</h4>
3029
3037
</details>
3030
3038
</details>
3031
3039
3040
+ <h5 id="intrinsic-main-sizes-compat">
3041
+ Web-compatible Intrinsic Sizing Algorithm</h5>
3042
+
3043
+ Note: The following algorithm has been demonstrated to be Web-compatible.
3044
+ It may be altered in the future to bring it closer to the ideal algorithm above,
3045
+ if possible.
3046
+
3047
+ ISSUE(8884): Outline Web-compatible algorithm here, once we have one.
3048
+
3049
+ <h5 id="intrinsic-main-sizes-multiline">
3050
+ Multi-line Min-content Algorithm</h5>
3051
+
3052
+ For a <em> <a>multi-line</a> </em> container,
3053
+ the [=min-content=] [=main size=] is simply the largest [[#intrinsic-item-contributions|min-content contribution]]
3054
+ of all the non-[=collapsed=] <a>flex items</a> in the <a>flex container</a> .
3055
+ For this purpose,
3056
+ each item's contribution
3057
+ is capped by the item’s [=flex base size=] if the item is not growable,
3058
+ floored by the item’s [=flex base size=] if the item is not shrinkable,
3059
+ and then further clamped by the item's min and max main sizes.
3060
+
3032
3061
<h4 id='intrinsic-cross-sizes'>
3033
3062
Flex Container Intrinsic Cross Sizes</h4>
3034
3063
0 commit comments