Re: [csswg-drafts] [css-grid-2] support automatic grid span for subgrids?

Proposed diff
```
diff --git a/css-grid-2/Overview.bs b/css-grid-2/Overview.bs
index 7a68df1..1a218cc 100644
--- a/css-grid-2/Overview.bs
+++ b/css-grid-2/Overview.bs
@@ -147,13 +147,36 @@ Characteristics of a Subgrid Item</h3>
 
   <ul style="list-style-type: lower-alpha">
     <li id="subgrid-tracks">
-      The number of explicit tracks in each subgridded dimension
-      is given by its <a>grid span</a> in that dimension,
-      rather than by 'grid-template-rows'/'grid-template-columns'.
-      The track sizes are governed by the parent grid.
-
+      Placing the <a>subgrid</a>
+      creates a correspondence between its subgridded tracks
+      and those that it spans in its parent grid.
       The grid lines thus shared between the subgrid and its parent
-      form the subgrid’s <a>explicit grid</a>.
+      form the subgrid’s <a>explicit grid</a>,
+      and its track sizes are governed by the parent grid.
+
+    <li id="subgrid-span">
+      The number of tracks in the <a>subgrid</a>
+      in a subgridded dimension
+      always corresponds to the number of <a>grid tracks</a>
+      that it spans in its parent <a>grid</a>:
+
+      <ul>
+        <li>
+          If the <a>subgrid</a>’s <a>grid span</a> in the subgridded dimension is definite,
+          then the number of explicit tracks in each subgridded dimension
+          is taken from its used <a>grid span</a> in that dimension
+          (regardless of its 'grid-template-*' properties).
+
+        <li>
+          If it has an <a>indefinite grid span</a>
+          (i.e. either the '-start' or '-end' value
+          of its <a>grid-placement properties</a> in the subgridded axis
+          is ''grid-row-start/auto'')
+          then its used <a>grid span</a> is taken
+          from the number of explicit tracks specified for that axis
+          by its 'grid-template-*' properties,
+          floored at one.
+      </ul>
 
     <li id="subgrid-indexing">
       The <a>grid-placement properties</a> of the <a>subgrid</a>’s <a>grid items</a>
```

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

Received on Thursday, 26 July 2018 21:54:53 UTC