Skip to content

Commit 7d69946

Browse files
committed
[css-grid] Ensure growth limit >= base size. <http://lists.w3.org/Archives/Public/www-style/2015Jan/0041.html>
1 parent 7393e02 commit 7d69946

2 files changed

Lines changed: 24 additions & 4 deletions

File tree

css-grid/Overview.bs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2701,8 +2701,6 @@ Track Sizing Algorithm</h3>
27012701
and which will eventually be the track's final size,
27022702
and a <dfn>growth limit</dfn>,
27032703
a <<length>> which provides a desired maximum size for the <a>base size</a>.
2704-
(The <a>base size</a> might end up being larger than the <a>growth limit</a>,
2705-
but the algorithm attempts to avoid this situation.)
27062704
There are 4 steps:
27072705

27082706
<ol>
@@ -2750,6 +2748,9 @@ Initialize Track Sizes</h3>
27502748
Use the track’s initial <a>base size</a> as its initial <a>growth limit</a>.
27512749
</dl>
27522750

2751+
In all cases, if the <a>growth limit</a> is less than the <a>base size</a>,
2752+
increase the <a>growth limit</a> to match the <a>base size</a>.
2753+
27532754
<h3 id="algo-content">
27542755
Resolve Intrinsic Track Sizes</h3>
27552756

@@ -2807,6 +2808,10 @@ Resolve Intrinsic Track Sizes</h3>
28072808
set its <a>growth limit</a>
28082809
to the maximum of the items’ <a>max-content contributions</a>.
28092810
</ul>
2811+
2812+
In all cases, if a track’s <a>growth limit</a> is now less than its <a>base size</a>,
2813+
increase the <a>growth limit</a> to match the <a>base size</a>.
2814+
28102815
<li>
28112816
<strong>Increase sizes to accommodate spanning items:</strong>
28122817
Next, consider the items with a span of 2
@@ -2832,6 +2837,9 @@ Resolve Intrinsic Track Sizes</h3>
28322837
a <a>min track sizing function</a> of ''max-content''
28332838
by <a href="#extra-space">distributing extra space</a> as needed
28342839
to account for these items' <a>max-content contributions</a>.
2840+
<li>
2841+
If at this point any track’s <a>growth limit</a> is now less than its <a>base size</a>,
2842+
increase its <a>growth limit</a> to match its <a>base size</a>.
28352843
<li>
28362844
<strong>For intrinsic maximums:</strong>
28372845
Next increase the <a>growth limit</a> of tracks with

css-grid/Overview.html

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4766,8 +4766,6 @@ <h3 class="heading settled" data-level="11.3" id="algo-track-sizing"><span class
47664766
and which will eventually be the track’s final size,
47674767
and a <dfn data-dfn-type="dfn" data-noexport="" id="growth-limit">growth limit<a class="self-link" href="#growth-limit"></a></dfn>,
47684768
a <a class="production css" data-link-type="type" href="http://dev.w3.org/csswg/css-values-3/#length-value">&lt;length></a> which provides a desired maximum size for the <a data-link-type="dfn" href="#base-size">base size</a>.
4769-
(The <a data-link-type="dfn" href="#base-size">base size</a> might end up being larger than the <a data-link-type="dfn" href="#growth-limit">growth limit</a>,
4770-
but the algorithm attempts to avoid this situation.)
47714769
There are 4 steps:</p>
47724770

47734771

@@ -4843,6 +4841,10 @@ <h3 class="heading settled" data-level="11.4" id="algo-init"><span class="secno"
48434841
</dl>
48444842

48454843

4844+
<p>In all cases, if the <a data-link-type="dfn" href="#growth-limit">growth limit</a> is less than the <a data-link-type="dfn" href="#base-size">base size</a>,
4845+
increase the <a data-link-type="dfn" href="#growth-limit">growth limit</a> to match the <a data-link-type="dfn" href="#base-size">base size</a>.</p>
4846+
4847+
48464848
<h3 class="heading settled" data-level="11.5" id="algo-content"><span class="secno">11.5. </span><span class="content">
48474849
Resolve Intrinsic Track Sizes</span><a class="self-link" href="#algo-content"></a></h3>
48484850

@@ -4913,6 +4915,12 @@ <h3 class="heading settled" data-level="11.5" id="algo-content"><span class="sec
49134915
</li>
49144916
</ul>
49154917

4918+
4919+
4920+
<p>In all cases, if a track’s <a data-link-type="dfn" href="#growth-limit">growth limit</a> is now less than its <a data-link-type="dfn" href="#base-size">base size</a>,
4921+
increase the <a data-link-type="dfn" href="#growth-limit">growth limit</a> to match the <a data-link-type="dfn" href="#base-size">base size</a>.</p>
4922+
4923+
49164924

49174925
</li>
49184926
<li>
@@ -4945,6 +4953,10 @@ <h3 class="heading settled" data-level="11.5" id="algo-content"><span class="sec
49454953
by <a href="#extra-space">distributing extra space</a> as needed
49464954
to account for these items' <a data-link-type="dfn" href="http://dev.w3.org/csswg/css-sizing-3/#max-content-contribution">max-content contributions</a>.
49474955
</li>
4956+
<li>
4957+
If at this point any track’s <a data-link-type="dfn" href="#growth-limit">growth limit</a> is now less than its <a data-link-type="dfn" href="#base-size">base size</a>,
4958+
increase its <a data-link-type="dfn" href="#growth-limit">growth limit</a> to match its <a data-link-type="dfn" href="#base-size">base size</a>.
4959+
</li>
49484960
<li>
49494961
<strong>For intrinsic maximums:</strong>
49504962
Next increase the <a data-link-type="dfn" href="#growth-limit">growth limit</a> of tracks with

0 commit comments

Comments
 (0)