You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: css-grid/Overview.bs
+18-30Lines changed: 18 additions & 30 deletions
Original file line number
Diff line number
Diff line change
@@ -716,11 +716,11 @@ Reordering and Accessibility</h2>
716
716
Grid Containers</h2>
717
717
718
718
<h3 id='grid-containers'>
719
-
Establishing Grid Containers: the ''display/grid'' and ''inline-grid'' 'display' values</h3>
719
+
Establishing Grid Containers: the ''display/grid'', ''inline-grid'', and ''subgrid'' 'display' values</h3>
720
720
721
721
<pre class="propdef">
722
722
Name: display
723
-
New values: grid | inline-grid
723
+
New values: grid | inline-grid | subgrid
724
724
</pre>
725
725
726
726
<dl dfn-for="display" dfn-type=value>
@@ -731,6 +731,20 @@ Establishing Grid Containers: the ''display/grid'' and ''inline-grid'' 'display'
731
731
<dt><dfn>inline-grid</dfn>
732
732
<dd>
733
733
This value causes an element to generate an inline-level <a>grid container</a> box.
734
+
735
+
<dt><dfn>subgrid</dfn>
736
+
<dd>
737
+
If the element is a <a>grid item</a>
738
+
(i.e. it is in-flow and its parent is a <a>grid container</a>),
739
+
this value makes the element a <a>subgrid</a>
740
+
(which is a special type of <a>grid container</a> box, see [[#subgrids]]).
741
+
742
+
Otherwise,
743
+
it behaves as ''grid''.
744
+
745
+
Issue: Should we make this contingent on whether grid-template-* have their initial values,
746
+
in case we want to expand this behavior in the future?
747
+
(Since grid-template-* is ignored by subgrids right now.)
734
748
</dl>
735
749
736
750
A <dfn export>grid container</dfn> establishes a new <dfn export>grid formatting context</dfn> for its contents.
@@ -784,7 +798,6 @@ Sizing Grid Containers</h3>
784
798
it is sized as an atomic inline-level box (such as an inline-block).
785
799
In both inline and block formatting contexts,
786
800
the <a>grid container</a>’s ''auto'' block size is its max-content size.
787
-
<span class="issue">The block layout spec should define this?</span>
788
801
789
802
The <a>max-content size</a> of a <a>grid container</a> is
790
803
the sum of the <a>grid container’s</a> track sizes in the appropriate axis,
@@ -2187,9 +2200,6 @@ Grid Definition Shorthand: the 'grid' property</h3>
2187
2200
<h2 id="subgrids">
2188
2201
Subgrids</h2>
2189
2202
2190
-
Issue: This section is under discussion and has not been finalized.
2191
-
The current text reflects <a href="https://lists.w3.org/Archives/Public/www-style/2016Apr/0254.html">this proposal</a> in preparation for WG discussion.
2192
-
2193
2203
A <a>grid item</a> can itself be a <a>grid container</a> by giving it ''display: grid'';
2194
2204
in this case the layout of its contents will be independent of the layout of the grid it participates in.
2195
2205
@@ -2202,31 +2212,9 @@ Subgrids</h2>
2202
2212
participate in sizing the <a>grid</a> of the parent <a>grid container</a>,
2203
2213
allowing the contents of both grids to align.
2204
2214
2205
-
<h3 id='subgrid-items'>
2206
-
Establishing Subgrids: the ''subgrid'' 'display' value</h3>
2207
-
2208
-
<pre class="propdef">
2209
-
Name: display
2210
-
New values: subgrid
2211
-
</pre>
2212
-
2213
-
<dl dfn-for="display" dfn-type=value>
2214
-
<dt><dfn>subgrid</dfn>
2215
-
<dd>
2216
-
If the element is a <a>grid item</a>
2217
-
(i.e. it is in-flow and its parent is a <a>grid container</a>),
2218
-
this value makes the element a <a>subgrid</a>.
2219
-
2220
-
Otherwise,
2221
-
it behaves as ''grid''.
2222
-
2223
-
Issue: Should we make this contingent on whether grid-template-* have their initial values,
2224
-
in case we want to expand this behavior in the future?
2225
-
(Since grid-template-* is ignored by subgrids right now.)
2226
-
</dl>
2227
-
2228
2215
<div class="example">
2229
-
For example, suppose we have a form consisting of a list of inputs with labels:
2216
+
For example, suppose we have a form consisting of a list of inputs with labels:
0 commit comments