Skip to content

Commit 5d4ee10

Browse files
committed
[css-grid] Move subgrid 'display' definition into the 'display' section of this spec. Delete more issues
1 parent 7da8ff2 commit 5d4ee10

1 file changed

Lines changed: 18 additions & 30 deletions

File tree

css-grid/Overview.bs

Lines changed: 18 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -716,11 +716,11 @@ Reordering and Accessibility</h2>
716716
Grid Containers</h2>
717717

718718
<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>
720720

721721
<pre class="propdef">
722722
Name: display
723-
New values: grid | inline-grid
723+
New values: grid | inline-grid | subgrid
724724
</pre>
725725

726726
<dl dfn-for="display" dfn-type=value>
@@ -731,6 +731,20 @@ Establishing Grid Containers: the ''display/grid'' and ''inline-grid'' 'display'
731731
<dt><dfn>inline-grid</dfn>
732732
<dd>
733733
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.)
734748
</dl>
735749

736750
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>
784798
it is sized as an atomic inline-level box (such as an inline-block).
785799
In both inline and block formatting contexts,
786800
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>
788801

789802
The <a>max-content size</a> of a <a>grid container</a> is
790803
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>
21872200
<h2 id="subgrids">
21882201
Subgrids</h2>
21892202

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-
21932203
A <a>grid item</a> can itself be a <a>grid container</a> by giving it ''display: grid'';
21942204
in this case the layout of its contents will be independent of the layout of the grid it participates in.
21952205

@@ -2202,31 +2212,9 @@ Subgrids</h2>
22022212
participate in sizing the <a>grid</a> of the parent <a>grid container</a>,
22032213
allowing the contents of both grids to align.
22042214

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-
22282215
<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:
2217+
22302218
<pre class="lang-html">
22312219
&lt;ul>
22322220
&lt;li>&lt;label>Name:&lt;/label> &lt;input name=fn>

0 commit comments

Comments
 (0)