Skip to content

Commit 7ce466b

Browse files
committed
[css-grid] Define that using subgrid when you're not a grid item is equivalent to 'none'.
1 parent 3f373b5 commit 7ce466b

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

css-grid/Overview.bs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,6 +1058,10 @@ Subgrids: the ''grid-template-rows/subgrid'' keyword</h4>
10581058
participate in sizing the <a>grid</a> of the parent <a>grid container</a>,
10591059
allowing the contents of both grids to align.
10601060

1061+
If a <a>grid container</a> that is <em>not</em> a <a>grid item</a> uses the ''subgrid'' keyword,
1062+
it 'grid-template-rows'/'grid-template-columns' value is treated identically to ''none''
1063+
(i.e. it doesn't have an <a>explicit grid</a> in that dimension).
1064+
10611065
<div class="example">
10621066
For example, suppose we have a form consisting of a list of inputs with labels:
10631067
<pre>

css-grid/Overview.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2268,6 +2268,11 @@ <h4 class="heading settled" data-level="5.1.4" id="subgrids"><span class="secno"
22682268
participate in sizing the <a data-link-type="dfn" href="#grid">grid</a> of the parent <a data-link-type="dfn" href="#grid-container">grid container</a>,
22692269
allowing the contents of both grids to align.</p>
22702270

2271+
2272+
<p>If a <a data-link-type="dfn" href="#grid-container">grid container</a> that is <em>not</em> a <a data-link-type="dfn" href="#grid-item">grid item</a> uses the <a class="css" data-link-type="maybe" href="#valdef-grid-template-rows-grid-template-columns-subgrid">subgrid</a> keyword,
2273+
it <a class="property" data-link-type="propdesc" href="#propdef-grid-template-rows">grid-template-rows</a>/<a class="property" data-link-type="propdesc" href="#propdef-grid-template-columns">grid-template-columns</a> value is treated identically to <a class="css" data-link-type="maybe" href="#valdef-grid-template-rows-grid-template-columns-none">none</a>
2274+
(i.e. it doesn’t have an <a data-link-type="dfn" href="#explicit-grid">explicit grid</a> in that dimension).</p>
2275+
22712276

22722277
<div class="example">
22732278
For example, suppose we have a form consisting of a list of inputs with labels:

0 commit comments

Comments
 (0)