Re: [csswg-drafts] [css-grid] Intrinsic size of grid containers (#2303)

Proposed edits for spanning items (accounting also for https://github.com/w3c/csswg-drafts/issues/3565):

```diff
diff --git a/css-grid-1/Overview.bs b/css-grid-1/Overview.bs
index 5b8ed42..9913a83 100644
--- a/css-grid-1/Overview.bs
+++ b/css-grid-1/Overview.bs
@@ -3975,9 +3975,9 @@ Resolve Intrinsic Track Sizes</h3>
           limited by the <a>max track sizing function</a>
           (which could be the argument to a ''fit-content()'' track sizing function)
           if that is <a lt="fixed sizing function">fixed</a>,
-          else by it's own <a lt="min-content contribution">min-</a>/<a>max-content contribution</a>
+          else by it's own <a>min-content contribution</a>
           if the <a>max track sizing function</a>
-          is ''grid-template-columns/min-content''/''grid-template-columns/max-content'';
+          is ''grid-template-columns/min-content'';
           and ultimately floored by its <a>minimum contribution</a> (defined below).
 
           Otherwise,
@@ -4018,11 +4018,7 @@ Resolve Intrinsic Track Sizes</h3>
     <li id="algo-spanning-items">
       <strong>Increase sizes to accommodate spanning items crossing content-sized tracks:</strong>
       Next, consider the items with a span of 2
-      that do not span a track with a <a>flexible sizing function</a>,
-      treating a <a>min track sizing function</a> of ''auto''
-      as ''min-content''/''max-content''
-      when the grid container is being sized under a
-      <a lt="min-content constraint">min</a>/<a>max-content constraint</a> (respectively):
+      that do not span a track with a <a>flexible sizing function</a>.
       <!-- auto-min contribution <= min-content contribution <= max-content contribution -->
 
       <ol>
@@ -4032,21 +4028,53 @@ Resolve Intrinsic Track Sizes</h3>
           an <a lt="intrinsic sizing function">intrinsic</a> <a>min track sizing function</a>
           by <a href="#extra-space">distributing extra space</a> as needed
           to accommodate these items’ <a>minimum contributions</a>.
+
+          If the grid container is being sized under a
+          <a lt="min-content constraint">min-</a> or <a>max-content constraint</a>,,
+          use the items’ <a>limited min-content contributions</a>
+          in place of their <a>minimum contributions</a> here.
+          For an item spanning multiple tracks,
+          the upper limit used to calculate
+          the item’s <a>limited min-/max-content contribution</a>
+          (see above)
+          is the greatest of
+          * infinity, if it spans any tracks
+            with an ''grid-template-columns/auto'' or ''grid-template-columns/max-content''
+            <a>max track sizing function</a>
+          * its own min-content contribution, if it spans any tracks
+            with an ''grid-template-columns/min-content''
+            <a>max track sizing function</a>
+          * the sum of the <a lt="fixed sizing function">fixed</a>
+            <a>max track sizing functions</a>
+            of any tracks it spans,
+            if it spans any such tracks.
+
         <li>
           <strong>For content-based minimums:</strong>
           Next continue to increase the <a>base size</a> of tracks with
           a <a>min track sizing function</a> of ''min-content'' or ''max-content''
           by <a href="#extra-space">distributing extra space</a> as needed
           to account for these items' <a>min-content contributions</a>.
+
         <li>
           <strong>For max-content minimums:</strong>
-          Third continue to increase the <a>base size</a> of tracks with
+          Next, if the grid container is being sized
+          under a <a>max-content constraint</a>,
+          continue to increase the <a>base size</a> of tracks with
+          a <a>min track sizing function</a> of
+          ''grid-template-columns/auto'' or ''max-content''
+          by <a href="#extra-space">distributing extra space</a> as needed
+          to account for these items' <a>limited max-content contributions</a>.
+
+          In all cases,
+          continue to increase the <a>base size</a> of tracks with
           a <a>min track sizing function</a> of ''max-content''
           by <a href="#extra-space">distributing extra space</a> as needed
           to account for these items' <a>max-content contributions</a>.
         <li>
           If at this point any track’s <a>growth limit</a> is now less than its <a>base size</a>,
           increase its <a>growth limit</a> to match its <a>base size</a>.
```

-- 
GitHub Notification of comment by fantasai
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2303#issuecomment-461343851 using your GitHub account

Received on Thursday, 7 February 2019 09:24:01 UTC