Skip to content

Commit 92a3d3a

Browse files
committed
[css-grid-1] Handle clamping of auto contributions for spanning items. #2303
1 parent d45256a commit 92a3d3a

File tree

3 files changed

+29
-8
lines changed

3 files changed

+29
-8
lines changed

css-grid-1/Overview.bs

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4021,11 +4021,7 @@ Resolve Intrinsic Track Sizes</h3>
40214021
<li id="algo-spanning-items">
40224022
<strong>Increase sizes to accommodate spanning items crossing content-sized tracks:</strong>
40234023
Next, consider the items with a span of 2
4024-
that do not span a track with a <a>flexible sizing function</a>,
4025-
treating a <a>min track sizing function</a> of ''auto''
4026-
as ''min-content''/''max-content''
4027-
when the grid container is being sized under a
4028-
<a lt="min-content constraint">min</a>/<a>max-content constraint</a> (respectively):
4024+
that do not span a track with a <a>flexible sizing function</a>.
40294025
<!-- auto-min contribution <= min-content contribution <= max-content contribution -->
40304026

40314027
<ol>
@@ -4035,21 +4031,45 @@ Resolve Intrinsic Track Sizes</h3>
40354031
an <a lt="intrinsic sizing function">intrinsic</a> <a>min track sizing function</a>
40364032
by <a href="#extra-space">distributing extra space</a> as needed
40374033
to accommodate these items’ <a>minimum contributions</a>.
4034+
4035+
If the grid container is being sized under a
4036+
<a lt="min-content constraint">min-</a> or <a>max-content constraint</a>,
4037+
use the items’ <a>limited min-content contributions</a>
4038+
in place of their <a>minimum contributions</a> here.
4039+
(For an item spanning multiple tracks,
4040+
the upper limit used to calculate
4041+
its <a lt="limited min-content contribution">limited min-/max-content contribution</a>
4042+
is the <em>sum</em> of the <a lt="fixed sizing function">fixed</a>
4043+
<a>max track sizing functions</a>
4044+
of any tracks it spans,
4045+
and is applied if it only spans such tracks.)
4046+
40384047
<li>
40394048
<strong>For content-based minimums:</strong>
40404049
Next continue to increase the <a>base size</a> of tracks with
40414050
a <a>min track sizing function</a> of ''min-content'' or ''max-content''
40424051
by <a href="#extra-space">distributing extra space</a> as needed
40434052
to account for these items' <a>min-content contributions</a>.
4053+
40444054
<li>
40454055
<strong>For max-content minimums:</strong>
4046-
Third continue to increase the <a>base size</a> of tracks with
4056+
Next, if the grid container is being sized
4057+
under a <a>max-content constraint</a>,
4058+
continue to increase the <a>base size</a> of tracks with
4059+
a <a>min track sizing function</a> of
4060+
''grid-template-columns/auto'' or ''max-content''
4061+
by <a href="#extra-space">distributing extra space</a> as needed
4062+
to account for these items' <a>limited max-content contributions</a>.
4063+
4064+
In all cases,
4065+
continue to increase the <a>base size</a> of tracks with
40474066
a <a>min track sizing function</a> of ''max-content''
40484067
by <a href="#extra-space">distributing extra space</a> as needed
40494068
to account for these items' <a>max-content contributions</a>.
40504069
<li>
40514070
If at this point any track’s <a>growth limit</a> is now less than its <a>base size</a>,
40524071
increase its <a>growth limit</a> to match its <a>base size</a>.
4072+
40534073
<li>
40544074
<strong>For intrinsic maximums:</strong>
40554075
Next increase the <a>growth limit</a> of tracks with
@@ -4099,6 +4119,7 @@ Resolve Intrinsic Track Sizes</h3>
40994119
</pre>
41004120
</blockquote>
41014121
</details>
4122+
41024123
<li>
41034124
<strong>For max-content maximums:</strong>
41044125
Lastly continue to increase the <a>growth limit</a> of tracks with

css-grid-1/issues-cr-2017.bsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ Issue 57.
498498
Summary: Add note that minimum contribution <= min-content contribution
499499
From: Oriol Brufau
500500
Comment: https://github.com/w3c/csswg-drafts/issues/3616#issuecomment-461396941
501-
Changes: https://github.com/w3c/csswg-drafts/commit/
501+
Changes: https://github.com/w3c/csswg-drafts/commit/7676ea26bcedaa69835fe43b92361523b3ef5890
502502
Closed: Accepted
503503
Resolved: Editorial
504504
----

css-grid-1/issues-cr-2017.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ <h1>CSS Grid Layout Level 1 Disposition of Comments for 2017-12-14 CR</h1>
536536
<span>Summary: Add note that minimum contribution &lt;= min-content contribution</span>
537537
<span>From: Oriol Brufau</span>
538538
<span>Comment: <a href='https://github.com/w3c/csswg-drafts/issues/3616#issuecomment-461396941'>https://github.com/w3c/csswg-drafts/issues/3616#issuecomment-461396941</a></span>
539-
<span>Changes: <a href='https://github.com/w3c/csswg-drafts/commit/'>https://github.com/w3c/csswg-drafts/commit/</a></span>
539+
<span>Changes: <a href='https://github.com/w3c/csswg-drafts/commit/7676ea26bcedaa69835fe43b92361523b3ef5890'>https://github.com/w3c/csswg-drafts/commit/7676ea26bcedaa69835fe43b92361523b3ef5890</a></span>
540540
<span class="a">Closed: Accepted</span>
541541
<span>Resolved: Editorial</span></pre>
542542
<script>

0 commit comments

Comments
 (0)