Skip to content

Commit fe703a3

Browse files
committed
Tweak the max-line-size step in the layout algorithm.
1 parent 4e4c1e8 commit fe703a3

2 files changed

Lines changed: 24 additions & 37 deletions

File tree

css3-flexbox/Overview.html

Lines changed: 18 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1849,31 +1849,24 @@ <h2 id=layout-algorithm><span class=secno>7. </span> Flexbox Layout
18491849
<ol>
18501850
<li>
18511851
<p>Determine the maximum line length, based on the main size of the
1852-
flexbox:</p>
1853-
1854-
<dl>
1855-
<dt>
1856-
1857-
<dt>size doesn't rely on its contents
1858-
1859-
<dd>The maximum line length is main size of the flexbox's content box,
1860-
constrained by the min and max main size constraints of the flexbox.
1861-
1862-
<dt>&lsquo;<code class=css>min-content</code>&rsquo;
1863-
1864-
<dd>The maximum line length is the flexbox's minimum main size.
1865-
1866-
<dt>&lsquo;<code class=css>max-content</code>&rsquo;
1867-
1868-
<dd>The maximum line length is infinity, constrained by the min and
1869-
max main size constraints of the flexbox.
1870-
1871-
<dt>&lsquo;<code class=css>fit-content</code>&rsquo;
1872-
1873-
<dd>The maximum line length is the greater of the flexbox's min size
1874-
constraint and the smaller of the flexbox's max size constraint and
1875-
the available space.
1876-
</dl>
1852+
flexbox. The maximum line length is main size of the flexbox's content
1853+
box, constrained by the min and max main size constraints of the
1854+
flexbox. If the main size depends on the flexbox's content, then:</p>
1855+
1856+
<ul>
1857+
<li>for &lsquo;<code class=css>min-content</code>&rsquo;, the maximum
1858+
line length is the flexbox's minimum main size, constrained by the
1859+
min and max main size constraints of the flexbox.
1860+
1861+
<li>for &lsquo;<code class=css>max-content</code>&rsquo;, the maximum
1862+
line length is infinity, constrained by the min and max main size
1863+
constraints of the flexbox.
1864+
1865+
<li>for &lsquo;<code class=css>fit-content</code>&rsquo;, the maximum
1866+
line length is the greater of the flexbox's min size constraint and
1867+
the smaller of the flexbox's max size constraint and the available
1868+
space.
1869+
</ul>
18771870

18781871
<li>Collect as many consecutive flexbox items as possible, starting from
18791872
the first item, while keeping the sum of their main size smaller than

css3-flexbox/Overview.src.html

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -904,21 +904,15 @@ <h2 id='layout-algorithm'>
904904

905905
<ol>
906906
<li>
907-
<p>Determine the maximum line length, based on the main size of the flexbox:</p>
907+
<p>Determine the maximum line length, based on the main size of the flexbox. The maximum line length is main size of the flexbox's content box, constrained by the min and max main size constraints of the flexbox. If the main size depends on the flexbox's content, then:</p>
908908

909-
<dt>
910-
<dt>size doesn't rely on its contents</dt>
911-
<dd>The maximum line length is main size of the flexbox's content box, constrained by the min and max main size constraints of the flexbox.</dd>
909+
<ul>
910+
<li>for ''min-content'', the maximum line length is the flexbox's minimum main size, constrained by the min and max main size constraints of the flexbox.</li>
912911

913-
<dt>''min-content''</dt>
914-
<dd>The maximum line length is the flexbox's minimum main size.</dd>
912+
<li>for ''max-content'', the maximum line length is infinity, constrained by the min and max main size constraints of the flexbox.</li>
915913

916-
<dt>''max-content''</dt>
917-
<dd>The maximum line length is infinity, constrained by the min and max main size constraints of the flexbox.</dd>
918-
919-
<dt>''fit-content''</dt>
920-
<dd>The maximum line length is the greater of the flexbox's min size constraint and the smaller of the flexbox's max size constraint and the available space.</dd>
921-
</dt>
914+
<li>for ''fit-content'', the maximum line length is the greater of the flexbox's min size constraint and the smaller of the flexbox's max size constraint and the available space.</li>
915+
</ul>
922916
</li>
923917

924918
<li>Collect as many consecutive flexbox items as possible, starting from the first item, while keeping the sum of their main size smaller than the flexbox's available space. If a flexbox item is sized with a flexible length, then for the purpose of this step, clamp the item's size between its minimum and maximum main sizes. The items so collected form a single flexbox line.</li>

0 commit comments

Comments
 (0)