You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: css3-flexbox/Overview.src.html
+31-72Lines changed: 31 additions & 72 deletions
Original file line number
Diff line number
Diff line change
@@ -627,7 +627,7 @@ <h2 id='flexibility'>
627
627
<td>no
628
628
<tr>
629
629
<th>Computed Value:
630
-
<td>Two integers for positive and negative flex, and either an absolute length (if <preferred-size> is given as a <length>) or the specified value for <preferred-size>.
630
+
<td>Two integers for positive and negative flex, and a preferredsizegiven either as an absolute length or a keyword.
631
631
<tr>
632
632
<th>Media:
633
633
<td>visual
@@ -1055,6 +1055,10 @@ <h2 id='layout-algorithm'>
1055
1055
* min-extent is always the extent after layout
1056
1056
-->
1057
1057
1058
+
<p>
1059
+
A size is <dfntitle="definite|indefinite">definite</dfn> if it is a <var><length></var>,
1060
+
or it is a <var><percentage></var> that is resolved against a definite size.
1061
+
1058
1062
<p>
1059
1063
To lay out a flexbox and its contents, follow these steps:
collect all the flexbox items into a single flexbox line.
1127
1118
1128
1119
<li>
1129
-
Otherwise, determine the <dfn>maximum line length</dfn>, based on the flexbox's main size:
1130
-
1131
-
<ul>
1132
-
<li>
1133
-
For a <i>definite</i> main size,
1134
-
use that size.
1135
-
1136
-
<li>
1137
-
For a ''min-content'' size,
1138
-
use the largest of the flexbox's item's <i>minimum size</i>.
1139
-
1140
-
<li>
1141
-
For a ''max-content'' size,
1142
-
use infinity.
1143
-
1144
-
<li>
1145
-
For a ''fit-content'' size,
1146
-
use the <i>fill-available measure</i> of the flexbox.
1147
-
</ul>
1148
-
1149
-
<p>
1150
-
In all cases, clamp the <i>maximum line length</i> according to the flexbox's <i>min main size property</i> and <i>max main size property</i>.
1151
-
1152
-
1153
-
1154
-
<li>Collect as many consecutive flexbox items as possible, starting from the first item, while keeping the sum of their
1155
-
margin-box main size smaller than the flexbox's available space.
1156
-
If a flexbox item is sized with a flexible length, then for the
1157
-
purpose of this step, clamp its size between its minimum and maximum main sizes. The items so collected form a single flexbox line.</li>
1158
-
1159
-
<li>Repeat the previous step, starting each time from the first flexbox item not yet collected into a flexbox line, until all flexbox items have been collected into flexbox lines.</li>
1160
-
1161
-
<p>
1162
-
A flexbox item's <dfn>minimum size</dfn> is:
1163
-
1164
-
<ul>
1165
-
<li>
1166
-
If the <i>preferred size</i> is <i>definite</i>, use that.
1167
-
1168
-
<li>
1169
-
</ol>
1170
-
</li>
1120
+
Otherwise,
1121
+
starting from the first uncollected item,
1122
+
collect as many consecutive flexbox items as will fit
1123
+
(but collect at least one)
1124
+
into the flexbox's inner main size into a flexbox line.
1125
+
For this step,
1126
+
the size of a flexbox item is its hypothetical outer main size,
1127
+
clamped by its min and max main size properties.
1128
+
Repeat until all flexbox items have been collected into flexbox lines.
1129
+
</ul>
1171
1130
1172
1131
<li>Find the actual main size of the flexbox. If the flexbox's main size doesn't rely on its contents, its actual main size is calculated per the appropriate rules. Otherwise, its main size is the length of its longest line, calculated by summing the main sizes of the margin boxes of each flexbox item in the line, constrained by the flexbox's min and max main size constraints.
1173
1132
If any margins are set to ''auto'', consider them to be set to zero until
0 commit comments