Skip to content

Commit f48098c

Browse files
committed
Properly treat 'auto' as min/max-content when under constraints, and use min-size contribution more consistently.
1 parent d5e56ec commit f48098c

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

css-grid/Overview.bs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3607,7 +3607,7 @@ Resolve Intrinsic Track Sizes</h3>
36073607

36083608
Otherwise,
36093609
set its <a>base size</a>
3610-
to the maximum of its items’ min-size contributions:
3610+
to the maximum of its items’ <dfn noexport>min-size contributions</dfn>:
36113611
the value specified by its respective 'min-width' or 'min-height' properties
36123612
(whichever matches the relevant axis)
36133613
if the specified size is ''width/auto'',
@@ -3645,18 +3645,21 @@ Resolve Intrinsic Track Sizes</h3>
36453645
First increase the <a>base size</a> of tracks with
36463646
a <a>min track sizing function</a> of ''min-content'', ''max-content'', or ''auto''
36473647
by <a href="#extra-space">distributing extra space</a> as needed
3648-
to accommodate the contributions dictated by these items’
3649-
minimum size (as specified by 'min-width'/'min-height').
3648+
to accommodate the contributions dictated by these items’ <a>min-size contributions</a>.
36503649
<li>
36513650
<strong>For content-based minimums:</strong>
36523651
Next continue to increase the <a>base size</a> of tracks with
3653-
a <a>min track sizing function</a> of ''min-content'' or ''max-content''
3652+
a <a>min track sizing function</a> of ''min-content'' or ''max-content'',
3653+
and tracks with a <a>min track sizing function</a> of ''auto''
3654+
if the <a>grid container</a> is being sized under a <a>min-content constraint</a>,
36543655
by <a href="#extra-space">distributing extra space</a> as needed
36553656
to account for these items' <a>min-content contributions</a>.
36563657
<li>
36573658
<strong>For max-content minimums:</strong>
36583659
Third continue to increase the <a>base size</a> of tracks with
3659-
a <a>min track sizing function</a> of ''max-content''
3660+
a <a>min track sizing function</a> of ''max-content'',
3661+
and tracks with a <a>min track sizing function</a> of ''auto''
3662+
if the <a>grid container</a> is being sized under a <a>max-content constraint</a>,
36603663
by <a href="#extra-space">distributing extra space</a> as needed
36613664
to account for these items' <a>max-content contributions</a>.
36623665
<li>
@@ -3667,7 +3670,7 @@ Resolve Intrinsic Track Sizes</h3>
36673670
Next increase the <a>growth limit</a> of tracks with
36683671
a <a>max track sizing function</a> of ''min-content'' or ''max-content'' (including ''auto'')
36693672
by <a href="#extra-space">distributing extra space</a> as needed
3670-
to account for these items' <a>min-content contributions</a>.
3673+
to account for these items' <a>min-size contributions</a>.
36713674
Mark any tracks whose <a>growth limit</a> changed
36723675
from infinite to finite in this step
36733676
as <dfn>infinitely growable</dfn> for the next step.

0 commit comments

Comments
 (0)