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
+23-18Lines changed: 23 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -787,7 +787,12 @@ <h3 id='flex-order'>
787
787
<h2id='flexibility'>
788
788
Flexibility: the 'flex' property</h2>
789
789
790
-
<p>The defining aspect of flexbox layout is the ability to make the <i>flexbox items</i> "flex", altering their width or height to fill the available space. This is done by using a 'flex' property. A flexbox distributes free space to its items proportional to their positive flexibility, or shrinks them to prevent overflow proportional to their negative flexibility.
790
+
<p>
791
+
The defining aspect of flexbox layout is the ability to make the <i>flexbox items</i> "flex",
792
+
altering their width or height to fill the available space.
793
+
This is done with the 'flex' property.
794
+
A flexbox distributes free space to its items proportional to their positive flexibility,
795
+
or shrinks them to prevent overflow proportional to their negative flexibility.
791
796
792
797
<tableclass=propdef>
793
798
<tr>
@@ -807,7 +812,7 @@ <h2 id='flexibility'>
807
812
<td>no
808
813
<tr>
809
814
<th>Computed Value:
810
-
<td>Two integers for positive and negative flex, and a preferred size given either as an absolute length or a keyword.
815
+
<td>Two numbers for positive and negative flex, and a flex basis given either as an absolute length or a keyword.
811
816
<tr>
812
817
<th>Media:
813
818
<td>visual
@@ -823,7 +828,7 @@ <h2 id='flexibility'>
823
828
The 'flex' property specifies the parameters of a <dfntitle="flexible length|flexible lengths|flexible length's">flexible length</dfn>:
824
829
the <dfnid="positive-flexibility" title="positive flexibility">positive</dfn>
825
830
and <dfn>negative flexibility</dfn>,
826
-
and the <dfn>preferred size</dfn>.
831
+
and the <dfn>flex basis</dfn>.
827
832
When the element containing 'flex' is a <i>flexbox item</i>,
828
833
'flex' is consulted <em>instead of</em> the <i>main size property</i>
829
834
to determine the <i>main size</i> of the element.
@@ -839,10 +844,10 @@ <h2 id='flexibility'>
839
844
the <i>positive flexibility</i> defaults to ''1''.
840
845
841
846
<p>
842
-
The <var><'width'></var> component sets the preferred size.
843
-
If omitted, the preferred size defaults to ''0px''.
847
+
The <var><'width'></var> component sets the flex basis.
848
+
If omitted, the flex basis defaults to ''0px''.
844
849
If the <var><'width'></var> component is ''auto'' on a child of a <i>flexbox</i>,
845
-
the <i>preferred size</i> is the computed value of the <i>main size property</i>.
850
+
the <i>flex basis</i> is the computed value of the <i>main size property</i>.
846
851
847
852
<p>
848
853
If the <var><'width'></var> is zero,
@@ -858,7 +863,7 @@ <h2 id='flexibility'>
858
863
859
864
<p>
860
865
The 'flex' property is animatable
861
-
by animating the <i>positive flexibility</i>, <i>negative flexibility</i>, and <i>preferred size</i> independently.
866
+
by animating the <i>positive flexibility</i>, <i>negative flexibility</i>, and <i>flex basis</i> independently.
862
867
863
868
<pclass='issue'>
864
869
Can you animate between zero and non-zero flex?
@@ -885,12 +890,12 @@ <h2 id='flexibility'>
885
890
</pre>
886
891
887
892
<p>
888
-
Here, all four paragraphs have a <i>preferred size</i> equal to the length of their text.
893
+
Here, all four paragraphs have a <i>flex basis</i> equal to the length of their text.
889
894
The leftover space
890
-
(after subtracting their preferred sizes and margins from the width of the flexbox)
895
+
(after subtracting their flex basises and margins from the width of the flexbox)
891
896
is distributed evenly to the four paragraphs.
892
897
This shows how elements with the same flexibility may still end up different sizes,
893
-
if their preferred sizes are different.
898
+
if their flex basises are different.
894
899
895
900
<imgsrc="images/wp7zxxyu.gif" alt="">
896
901
@@ -920,7 +925,7 @@ <h3 id='auto-margins'>
920
925
921
926
<ul>
922
927
<li>
923
-
During calculations of preferred sizes and flexible lengths, auto margins are treated as ''0''.
928
+
During calculations of flex basises and flexible lengths, auto margins are treated as ''0''.
924
929
925
930
<li>
926
931
Prior to alignment via 'flex-pack' and 'flex-item-align',
if the flexbox's main-axis is parallel to the item's inline-axis,
1378
-
lay out the item using its preferred size
1383
+
lay out the item using its flex basis
1379
1384
and the available space,
1380
1385
treating ''auto'' as ''fit-content''
1381
1386
unless the item's writing mode is perpendicular to the flexbox's writing mode
1382
1387
(in which case <ahref="http://www.w3.org/TR/css3-writing-modes/#orthogonal-flows">the rules for a box in an orthogonal flow</a> [[!CSS3-WRITING-MODES]] are in effect).
1383
-
If the preferred size is ''fill-available'', or ''fit-content'',
1388
+
If the flex basis is ''fill-available'', or ''fit-content'',
1384
1389
and the flexbox is being sized under a min-content or max-content main-size constraint,
1385
1390
size the item under that constraint instead.
1386
1391
The hypothetical size is the item's resulting measure.
unless the item's writing mode is perpendicular to the flexbox's writing mode
1394
1399
(in which case <ahref="http://www.w3.org/TR/css3-writing-modes/#orthogonal-flows">the rules for a box in an orthogonal flow</a> [[!CSS3-WRITING-MODES]] are in effect).
1395
-
If the preferred size is ''auto'', ''fill-available'', or ''fit-content'',
1400
+
If the flex basis is ''auto'', ''fill-available'', or ''fit-content'',
1396
1401
and the flexbox is being sized under a min-content or max-content cross-size constraint,
1397
1402
size the item under that constraint instead.
1398
1403
The hypothetical size is the item's resulting max-content extent.
1399
1404
</ul>
1400
1405
1401
1406
<p>
1402
-
<em>Do not apply min/max-width/height constraints to the preferred size of flexible lengths —
1407
+
<em>Do not apply min/max-width/height constraints to the flex basis of flexible lengths —
1403
1408
those constraints are handled elsewhere in this algorithm, and doing so will produce incorrect results.</em>
1404
1409
1405
1410
<li>
@@ -1409,7 +1414,7 @@ <h2 id='layout-algorithm'>
1409
1414
and the <i>max content main size</i> of the flexbox
1410
1415
is the sum of the flexbox's items' <i>max-content size contributions</i>.
1411
1416
For these computations, ''auto'' margins are treated as ''0'',
1412
-
and for flexbox items the preferred size is used in place of the <i>main size property</i>.
1417
+
and for flexbox items the flex basis is used in place of the <i>main size property</i>.
1413
1418
1414
1419
<li>
1415
1420
<strong>Collect flexbox items into flexbox lines:</strong>
@@ -1645,7 +1650,7 @@ <h2 id="pagination">
1645
1650
<ol>
1646
1651
<li>
1647
1652
<p>If flexbox main-axis size is definite, flexbox algorithm must be run first, without constraints of available space on page and using all content of the flexbox. Otherwise
1648
-
flexbox items use the preferred size, adjusted for min/max.
1653
+
flexbox items use the flex basis, adjusted for min/max.
1649
1654
1650
1655
<p>If page size varies and flexbox size depends on page size, this step has to be repeated on each page, again with the whole content of the flexbox.
0 commit comments