Skip to content

Commit 5794324

Browse files
committed
[css-grid] Put explanation of the 'infinitely growable' flag into the spec.
1 parent 33dc5a6 commit 5794324

3 files changed

Lines changed: 45 additions & 4 deletions

File tree

css-grid/Overview.bs

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3071,7 +3071,44 @@ Resolve Intrinsic Track Sizes</h3>
30713071
Mark any tracks whose <a>growth limit</a> changed
30723072
from infinite to finite in this step
30733073
as <dfn>infinitely growable</dfn> for the next step.
3074-
<!-- http://lists.w3.org/Archives/Public/www-style/2014Mar/0500.html -->
3074+
3075+
<details class=why>
3076+
<summary>Why does the <a>infinitely growable</a> flag exist?</summary>
3077+
3078+
<a href="http://lists.w3.org/Archives/Public/www-style/2014Mar/0500.html">Peter Salas explains</a>:
3079+
3080+
<blockquote cite="http://lists.w3.org/Archives/Public/www-style/2014Mar/0500.html">
3081+
Consider the following case:
3082+
3083+
Two "auto" tracks (i.e. "minmax(min-content, max-content) minmax(min-content, max-content)").
3084+
Item 1 is in track 1, and has min-content = max-content = 10.
3085+
Item 2 spans tracks 1 and 2, and has min-content = 30, max-content = 100.
3086+
3087+
After resolving min-content/max-content for the first item, we have this.
3088+
3089+
track 1: used breadth = 10 max breadth = 10
3090+
3091+
track 2: used breadth = 0 max breadth = infinity
3092+
3093+
Then we resolve min-content/max-content for the second item.
3094+
3095+
Phase 1 sets the used breadth of track 2 to 20 so that the two tracks' used breadths sum to 30.
3096+
Phase 2 does nothing because there are no relevant tracks.
3097+
Phase 3 sets the max breadth of track 2 to 20 so that the two tracks' max breadths sum to 30.
3098+
In phase 4, we need to grow the sum of the max breadths by 70 to accommodate item 2.
3099+
Two options are:
3100+
3101+
1. Grow each track's max breadth equally,
3102+
and end up with max breadths = [45, 55].
3103+
2. Grow only the second track's max breadth,
3104+
and end up with max breadths = [10, 90].
3105+
3106+
By not considering the just-set max breadth as a constraint during space distribution
3107+
(i.e. by treating it as infinity),
3108+
we get the second result,
3109+
which we considered a better result because the first track remains sized exactly to the first item.
3110+
</blockquote>
3111+
</details>
30753112
<li>
30763113
<strong>For max-content maximums:</strong>
30773114
Lastly continue to increase the <a>growth limit</a> of tracks with

css-grid/issues-wd-20150108.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,15 @@ <h1>CSS Grid Layout Level 1 Disposition of Comments for 2015-03-17 WD</h1>
9999
Comment: <a href='https://lists.w3.org/Archives/Public/www-style/2015Jan/0506.html'>https://lists.w3.org/Archives/Public/www-style/2015Jan/0506.html</a>
100100
Response: <a href='https://lists.w3.org/Archives/Public/www-style/2015May/0110.html'>https://lists.w3.org/Archives/Public/www-style/2015May/0110.html</a>
101101
Closed: Accepted</pre>
102-
<pre class=' open' id='issue-11'>
102+
<pre class='a' id='issue-11'>
103103
Issue 11. <a href='#issue-11'>#</a>
104104
Summary: Add note to "infinitely growable" flag to help confusion
105105
From: Sergio Villar Senin
106106
Comment: <a href='https://lists.w3.org/Archives/Public/www-style/2015Feb/0013.html'>https://lists.w3.org/Archives/Public/www-style/2015Feb/0013.html</a>
107107
Response: <a href='https://lists.w3.org/Archives/Public/www-style/2015Feb/0014.html'>https://lists.w3.org/Archives/Public/www-style/2015Feb/0014.html</a>
108-
Open</pre>
108+
Response: <a href='https://lists.w3.org/Archives/Public/www-style/2015May/0111.html'>https://lists.w3.org/Archives/Public/www-style/2015May/0111.html</a>
109+
Closed: Accepted
110+
Resolved: editorial</pre>
109111
<pre class=' open' id='issue-12'>
110112
Issue 12. <a href='#issue-12'>#</a>
111113
Summary: Allow for centered grids of unknown number of columns

css-grid/issues-wd-20150108.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ Summary: Add note to "infinitely growable" flag to help confusion
7575
From: Sergio Villar Senin
7676
Comment: https://lists.w3.org/Archives/Public/www-style/2015Feb/0013.html
7777
Response: https://lists.w3.org/Archives/Public/www-style/2015Feb/0014.html
78-
Open
78+
Response: https://lists.w3.org/Archives/Public/www-style/2015May/0111.html
79+
Closed: Accepted
80+
Resolved: editorial
7981
----
8082
Issue 12.
8183
Summary: Allow for centered grids of unknown number of columns

0 commit comments

Comments
 (0)