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
+12-12Lines changed: 12 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -761,7 +761,7 @@ <h3 id='flex-align'>
761
761
<dd>The <i>cross-end</i> margin edge of the <i>flexbox item</i> is placed flush with the <i>cross-end</i> edge of the line.</dd>
762
762
763
763
<dt><dfnid="flex-align-center">center</dfn></dt>
764
-
<dd>The <i>flexbox item's</i> margin box is centered in the <i>cross axis</i> within the line. (If the <i>cross size</i> of the flexbox is less than than that of the <i>flexbox item</i>, it will overflow equally in both directions.)</dd>
764
+
<dd>The <i>flexbox item's</i> margin box is centered in the <i>cross axis</i> within the line. (If the <i>cross size</i> of the flexbox is less than that of the <i>flexbox item</i>, it will overflow equally in both directions.)</dd>
Margins on flexbox items can be set to 'auto', with effect very similar to auto
814
814
margins in normal flow. </p>
815
815
<ul>
816
-
<li>Through calculations of preferred sizes and flexible lenghts, auto
816
+
<li>Through calculations of preferred sizes and flexible lengths, auto
817
817
margins are considered to be zero.</li>
818
818
<li> Immediately <em>before</em> pack and align steps, if there are any
819
819
auto margins on items in the direction of alignment and there is positive
820
820
free space, the free space is distributed equally to the auto margins. </li>
821
-
<li>If free space was distributied to auto margins, the following pack or align
821
+
<li>If free space was distributed to auto margins, the following pack or align
822
822
step has no effect.</li>
823
823
</ul>
824
824
<divclass="example">
825
825
<p>Auto margins can be used for simple alignment or for fine control.</p>
826
826
<p>Note that auto margins work consistently in both dimensions, so a simple
827
827
markup like this</p>
828
-
<pre>div { display:-ms-box;
828
+
<pre>div { display:flexbox;
829
829
width:4em; height:4em; background:silver;
830
830
}
831
831
p { margin:auto; }
@@ -942,7 +942,7 @@ <h2 id='layout-algorithm'>
942
942
<p>To lay out a flexbox and its contents, follow these steps:</p>
943
943
944
944
<ol>
945
-
<livalue=0>Generate anonymous flexbox items around runs of continguous inline content in the flexbox, as described in the <ahref="#flex-items">Flexbox Items</a> section.</li>
945
+
<livalue=0>Generate anonymous flexbox items around runs of contiguous inline content in the flexbox, as described in the <ahref="#flex-items">Flexbox Items</a> section.</li>
946
946
947
947
<li>Re-order the flexbox items according to their 'flex-order'. The items with the lowest (most negative) 'flex-order' values are first in the ordering. If multiple items share a 'flex-order' value, they're ordered by document order. This affects the order in which the flexbox items generate boxes in the box-tree, and how the rest of this algorithm deals with the items.</li>
948
948
@@ -955,7 +955,7 @@ <h2 id='layout-algorithm'>
955
955
<li>
956
956
<p>Otherwise layout the flexbox items using the shrink-to-fit algorithm.</p>
957
957
958
-
<p>Calculation of the shrink-to-fit width is similar to calculating the width of a table cell using the automatic table layout algorithm. Roughly: calculate the preferred width by formatting the content without breaking lines other than where explicit line breaks occur, and also calculate the preferred minimum width, e.g., by trying all possible line breaks. This module doesn't define the exact algorith, but it is expected that the shrink-to-fit size is calculated the same way as it is for floats, except in this case it is not affected by available space.</p>
958
+
<p>Calculation of the shrink-to-fit width is similar to calculating the width of a table cell using the automatic table layout algorithm. Roughly: calculate the preferred width by formatting the content without breaking lines other than where explicit line breaks occur, and also calculate the preferred minimum width, e.g., by trying all possible line breaks. This module doesn't define the exact algorithm, but it is expected that the shrink-to-fit size is calculated the same way as it is for floats, except in this case it is not affected by available space.</p>
959
959
960
960
<divclass="issue"><p>TODO: define shrink-to-fit. It works
<li>Determine the final cross size of each flexbox item. For each flexbox item, if it has ''flex-item-align:stretch'', its final cross size is
1048
1048
set so that its margin-box cross size is equal to cross-size of its flexbox line. For all other flexbox items, its final cross size is its hypothetical cross size.
1049
1049
If the result conflicts with 'min-width', 'max-width', 'min-height' or
1050
-
'max-height', correct the result to comply the the restrictions.</li>
1050
+
'max-height', correct the result to comply the restrictions.</li>
1051
1051
<pclass="issue">'auto' height must only grow, not shrink here</p>
1052
1052
1053
1053
<li>Resolve 'auto' margins on cross axis. For each flexbox item, if its
1054
1054
margin box cross size is smaller than cross size of its line and it has
1055
1055
any margins in cross direction set to 'auto', distribute the difference
1056
-
equaly to the auto margins. </li>
1056
+
equally to the auto margins. </li>
1057
1057
<li>For each flexbox line, align the flexbox items per 'flex-item-align'.</li>
1058
1058
1059
1059
<li>Align the flexbox lines per 'flex-line-pack'. The leftover free-space is calculated by subtracting the sum of the flexbox line's cross sizes from the cross size of the flexbox's content box.</li>
@@ -1153,7 +1153,7 @@ <h2 id="pagination">
1153
1153
<li>In a row-direction single-line flexbox, breaks before and after items apply to the flexbox</li>
1154
1154
<pclass="issue">"break-inside:avoid" in single-line horizontal should probably be applied to flexbox too.</p>
1155
1155
1156
-
<li>In column-directon single-line flexbox and all multi-line flexboxes:
1156
+
<li>In column-direction single-line flexbox and all multi-line flexboxes:
1157
1157
1158
1158
<ol>
1159
1159
<li>Forced break before the first item is applied to the flexbox</li>
@@ -1188,14 +1188,14 @@ <h2 id="pagination">
1188
1188
<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.</p>
1189
1189
</li>
1190
1190
1191
-
<li>Set of items that will fit on current page is determined by adding main-axis sizes of items until total size exceeds avaialble space or a forced break is encountered.</li>
1191
+
<li>Set of items that will fit on current page is determined by adding main-axis sizes of items until total size exceeds availalble space or a forced break is encountered.</li>
1192
1192
1193
1193
<li>If border box of an item doesn’t fit in available space, a break inside the item is considered</li>
1194
1194
1195
1195
<li>
1196
1196
<p>Items that fit on a page completely or partially are aligned according to ‘flex-pack’ property, independently from the rest of flexbox content.</p>
1197
1197
1198
-
<p>Note that flexible lenghts are not recalculated on each page, even if there is additional free space.</p>
1198
+
<p>Note that flexible lengths are not recalculated on each page, even if there is additional free space.</p>
1199
1199
</li>
1200
1200
</ol>
1201
1201
@@ -1286,7 +1286,7 @@ <h2 id="pagination">
1286
1286
that have fit on the current page.</li>
1287
1287
1288
1288
<li>Line packing is done on each page, with content on the page</li>
1289
-
<pclass="issue">TODO: combine breaking algorightms for multiline in both directions. If breaks inside items are not allowed the algorithm is almost same.</p>
1289
+
<pclass="issue">TODO: combine breaking algorigthms for multiline in both directions. If breaks inside items are not allowed the algorithm is almost same.</p>
0 commit comments