Skip to content

Commit c7c08ff

Browse files
committed
[css-grid] Fix some wording, fix grammar error in 'grid' shorthand, add issue for making ''grid: subgrid'' valid.
1 parent 48d8a32 commit c7c08ff

2 files changed

Lines changed: 22 additions & 12 deletions

File tree

css-grid/Overview.html

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1076,7 +1076,7 @@ <h4 class="heading settled heading" data-level=5.1.4 id=subgrids><span class=sec
10761076
<p>
10771077
A <a href=#subgrid>subgrid</a> behaves just like a normal <a href=#grid-container>grid container</a> except that:
10781078

1079-
<p> <ul>
1079+
<p> <ul style="list-style-type: lower-alpha">
10801080
<li>
10811081
The number of explicit tracks is given by its <a href=#grid-span>grid span</a>,
10821082
rather than by <a class=property data-link-type=propdesc href=#propdef-grid-template-rows title=grid-template-rows>grid-template-rows</a>/<a class=property data-link-type=propdesc href=#propdef-grid-template-columns title=grid-template-columns>grid-template-columns</a>.
@@ -1114,11 +1114,11 @@ <h4 class="heading settled heading" data-level=5.1.4 id=subgrids><span class=sec
11141114

11151115
<li>
11161116
Explicit named lines can also be specified together with the <a data-link-type=value href=#valuedef-subgrid>subgrid</a> keyword;
1117-
these names apply to the corresponding lines taken from the parent <a href=#grid>grid</a>.
1117+
these names apply (within the <a href=#subgrid>subgrid</a>) to the corresponding lines of the parent <a href=#grid>grid</a>.
11181118
If the <a href=#subgrid>subgrid</a> has an explicit <a href=#grid-span>grid span</a>,
11191119
any names specified for lines beyond the span are ignored.
11201120
If the <a href=#subgrid>subgrid</a> has an explicit <a href=#grid-position>grid position</a> as well as an explicit <a href=#grid-span>grid span</a>,
1121-
it also automatically receives the names of the lines that it covers in its parent <a href=#grid>grid</a>.
1121+
it also automatically receives the line names specified for its parent <a href=#grid>grid</a>.
11221122
</ul>
11231123

11241124
<div class=example>
@@ -1139,7 +1139,8 @@ <h4 class="heading settled heading" data-level=5.1.4 id=subgrids><span class=sec
11391139
grid-template-columns: auto 1fr;
11401140
}
11411141
li {
1142-
display: subgrid;
1142+
display: grid;
1143+
grid: subgrid / subgrid;
11431144
margin: 0.5em;
11441145
border: solid;
11451146
padding: 0.5em;
@@ -1358,6 +1359,9 @@ <h3 class="heading settled heading" data-level=5.3 id=explicit-grid-shorthand><s
13581359
Unless authors want those to cascade in separately,
13591360
it is therefore recommended to use <a class=property data-link-type=propdesc href=#propdef-grid title=grid>grid</a> instead of <a class=property data-link-type=propdesc href=#propdef-grid-template title=grid-template>grid-template</a>.
13601361

1362+
<p class=issue id=issue-b47dff3b><a class=self-link href=#issue-b47dff3b></a>Would be nice if <a class=css data-link-type=maybe href=#propdef-grid title=grid>grid: subgrid</a> just worked.
1363+
Investigate tweaking grammar for that.
1364+
13611365
<h2 class="heading settled heading" data-level=6 id=implicit-grids><span class=secno>6 </span><span class=content>
13621366
The Implicit Grid</span><a class=self-link href=#implicit-grids></a></h2>
13631367

@@ -1708,7 +1712,7 @@ <h3 class="heading settled heading" data-level=6.3 id=grid-auto-position-propert
17081712
<h2 class="heading settled heading" data-level=7 id=grid-shorthand><span class=secno>7 </span><span class=content>
17091713
Grid Definition Shorthand: the <a class=property data-link-type=propdesc href=#propdef-grid title=grid>grid</a> property</span><a class=self-link href=#grid-shorthand></a></h2>
17101714

1711-
<table class=propdef><tr><th>Name:<td><dfn data-dfn-type=property data-export="" id=propdef-grid>grid<a class=self-link href=#propdef-grid></a></dfn><tr><th>Value:<td><a class=production data-link-type=propdesc href=#propdef-grid-template title=grid-template>&lt;‘grid-template’&gt;</a> | <a class=production data-link-type=propdesc href=#propdef-grid-auto-flow title=grid-auto-flow>&lt;‘grid-auto-flow’&gt;</a> || [ <a class=production data-link-type=propdesc href=#propdef-grid-auto-columns title=grid-auto-columns>&lt;‘grid-auto-columns’&gt;</a> [ / <a class=production data-link-type=propdesc href=#propdef-grid-auto-rows title=grid-auto-rows>&lt;‘grid-auto-rows’&gt;</a> ]? ]<tr><th>Initial:<td>see individual properties<tr><th>Applies to:<td><a href=#grid-container>grid containers</a><tr><th>Inherited:<td>see individual properties<tr><th>Media:<td>visual<tr><th>Computed value:<td>see individual properties<tr><th>Percentages:<td>see individual properties</table>
1715+
<table class=propdef><tr><th>Name:<td><dfn data-dfn-type=property data-export="" id=propdef-grid>grid<a class=self-link href=#propdef-grid></a></dfn><tr><th>Value:<td><a class=production data-link-type=propdesc href=#propdef-grid-template title=grid-template>&lt;‘grid-template’&gt;</a> | <a class=production data-link-type=propdesc href=#propdef-grid-auto-flow title=grid-auto-flow>&lt;‘grid-auto-flow’&gt;</a> [ <a class=production data-link-type=propdesc href=#propdef-grid-auto-columns title=grid-auto-columns>&lt;‘grid-auto-columns’&gt;</a> [ / <a class=production data-link-type=propdesc href=#propdef-grid-auto-rows title=grid-auto-rows>&lt;‘grid-auto-rows’&gt;</a> ]? ]<tr><th>Initial:<td>see individual properties<tr><th>Applies to:<td><a href=#grid-container>grid containers</a><tr><th>Inherited:<td>see individual properties<tr><th>Media:<td>visual<tr><th>Computed value:<td>see individual properties<tr><th>Percentages:<td>see individual properties</table>
17121716
<p>
17131717
The <a class=property data-link-type=propdesc href=#propdef-grid title=grid>grid</a> property is a shorthand that sets
17141718
all of the explicit grid properties
@@ -1723,7 +1727,7 @@ <h2 class="heading settled heading" data-level=7 id=grid-shorthand><span class=s
17231727
<div class=example>
17241728
<p>In addition to accepting the <a class=property data-link-type=propdesc href=#propdef-grid-template title=grid-template>grid-template</a> shorthand syntax for setting up the <a href=#explicit-grid>explicit grid</a>,
17251729
the <a class=property data-link-type=propdesc href=#propdef-grid title=grid>grid</a> shorthand can also easily set up parameters for an auto-formatted grid.
1726-
For example, <a class=css data-link-type=maybe href=#propdef-grid title=grid>grid: 1fr;</a> is equivalent to
1730+
For example, <a class=css data-link-type=maybe href=#propdef-grid title=grid>grid: rows 1fr;</a> is equivalent to
17271731
<pre>grid-template: none;
17281732
grid-auto-columns: 1fr;
17291733
grid-auto-rows: 1fr;
@@ -2924,7 +2928,7 @@ <h2 class="no-num no-ref heading settled heading" id=property-index><span class=
29242928
<tr><th scope=row><a data-property="">grid-auto-rows</a><td><a class=production data-link-type=type href=#typedef-track-size>&lt;track-size&gt;</a><td>auto<td><td>no<td>see <a href=#track-sizing>Track Sizing</a><td>visual<td><a href=#grid-container>grid containers</a><td>see <a href=#track-sizing>Track Sizing</a><td>
29252929
<tr><th scope=row><a data-property="">grid-auto-flow</a><td>none | [ [ rows | columns ] &amp;&amp; dense? ]<td>none<td><td>no<td>n/a<td>visual<td><a href=#grid-container>grid containers</a><td>specified value<td>
29262930
<tr><th scope=row><a data-property="">grid-auto-position</a><td><a class=production data-link-type=type href=#typedef-grid-line>&lt;grid-line&gt;</a> / <a class=production data-link-type=type href=#typedef-grid-line>&lt;grid-line&gt;</a><td>1 / 1<td><td>no<td>na/<td>visual<td><a href=#grid-container>grid containers</a><td>specified value<td>
2927-
<tr><th scope=row><a data-property="">grid</a><td><a class=production data-link-type=propdesc href=#propdef-grid-template title=grid-template>&lt;‘grid-template’&gt;</a> | <a class=production data-link-type=propdesc href=#propdef-grid-auto-flow title=grid-auto-flow>&lt;‘grid-auto-flow’&gt;</a> || [ <a class=production data-link-type=propdesc href=#propdef-grid-auto-columns title=grid-auto-columns>&lt;‘grid-auto-columns’&gt;</a> [ / <a class=production data-link-type=propdesc href=#propdef-grid-auto-rows title=grid-auto-rows>&lt;‘grid-auto-rows’&gt;</a> ]? ]<td>see individual properties<td><td>see individual properties<td>see individual properties<td>visual<td><a href=#grid-container>grid containers</a><td>see individual properties<td>
2931+
<tr><th scope=row><a data-property="">grid</a><td><a class=production data-link-type=propdesc href=#propdef-grid-template title=grid-template>&lt;‘grid-template’&gt;</a> | <a class=production data-link-type=propdesc href=#propdef-grid-auto-flow title=grid-auto-flow>&lt;‘grid-auto-flow’&gt;</a> [ <a class=production data-link-type=propdesc href=#propdef-grid-auto-columns title=grid-auto-columns>&lt;‘grid-auto-columns’&gt;</a> [ / <a class=production data-link-type=propdesc href=#propdef-grid-auto-rows title=grid-auto-rows>&lt;‘grid-auto-rows’&gt;</a> ]? ]<td>see individual properties<td><td>see individual properties<td>see individual properties<td>visual<td><a href=#grid-container>grid containers</a><td>see individual properties<td>
29282932
<tr><th scope=row><a data-property="">grid-row-start</a><td><a class=production data-link-type=type href=#typedef-grid-line>&lt;grid-line&gt;</a><td>auto<td><td>no<td>n/a<td>visual<td><a href=#grid-item>grid items</a><td>specified value (almost)<td>
29292933
<tr><th scope=row><a data-property="">grid-column-start</a><td><a class=production data-link-type=type href=#typedef-grid-line>&lt;grid-line&gt;</a><td>auto<td><td>no<td>n/a<td>visual<td><a href=#grid-item>grid items</a><td>specified value (almost)<td>
29302934
<tr><th scope=row><a data-property="">grid-row-end</a><td><a class=production data-link-type=type href=#typedef-grid-line>&lt;grid-line&gt;</a><td>auto<td><td>no<td>n/a<td>visual<td><a href=#grid-item>grid items</a><td>specified value (almost)<td>
@@ -2947,7 +2951,10 @@ <h2 class="no-num no-ref heading settled heading" id=property-index><span class=
29472951
<a href=#issue-10e57cb7></a><p class=issue>
29482952
Make sure Flexbox and Grid Layout have consistent models for static position.
29492953

2950-
<a href=#issue-cc903511></a><p class=issue>
2954+
<a href=#issue-cc903511></a><p class=issue>Would be nice if <a class=css data-link-type=maybe href=#propdef-grid title=grid>grid: subgrid</a> just worked.
2955+
Investigate tweaking grammar for that.
2956+
2957+
<a href=#issue-b47dff3b></a><p class=issue>
29512958
Win8 compat might require the <a data-link-for=grid-auto-flow data-link-type=value href=#valuedef-none>none</a> value to stay the initial value,
29522959
but it’s not a very good value,
29532960
because by default the entire contents of a grid container will end up stacked on top of each other.

css-grid/Overview.src.html

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,11 +1046,11 @@ <h4 id="subgrids">
10461046

10471047
<li>
10481048
Explicit named lines can also be specified together with the <a value>subgrid</a> keyword;
1049-
these names apply to the corresponding lines taken from the parent <a>grid</a>.
1049+
these names apply (within the <a>subgrid</a>) to the corresponding lines of the parent <a>grid</a>.
10501050
If the <a>subgrid</a> has an explicit <a>grid span</a>,
10511051
any names specified for lines beyond the span are ignored.
10521052
If the <a>subgrid</a> has an explicit <a>grid position</a> as well as an explicit <a>grid span</a>,
1053-
it also automatically receives the names of the lines that it covers in its parent <a>grid</a>.
1053+
it also automatically receives the line names specified for its parent <a>grid</a>.
10541054
</ul>
10551055

10561056
<div class="example">
@@ -1326,6 +1326,9 @@ <h3 id='explicit-grid-shorthand'>
13261326
Unless authors want those to cascade in separately,
13271327
it is therefore recommended to use 'grid' instead of 'grid-template'.
13281328

1329+
<p class="issue">Would be nice if ''grid: subgrid'' just worked.
1330+
Investigate tweaking grammar for that.
1331+
13291332
<h2 id='implicit-grids'>
13301333
The Implicit Grid</h2>
13311334

@@ -1714,7 +1717,7 @@ <h2 id='grid-shorthand'>
17141717

17151718
<pre class='propdef'>
17161719
Name: grid
1717-
Value: <<'grid-template'>> | <<'grid-auto-flow'>> || [ <<'grid-auto-columns'>> [ / <<'grid-auto-rows'>> ]? ]
1720+
Value: <<'grid-template'>> | <<'grid-auto-flow'>> [ <<'grid-auto-columns'>> [ / <<'grid-auto-rows'>> ]? ]
17181721
Initial: see individual properties
17191722
Applies to: <a>grid containers</a>
17201723
Inherited: see individual properties
@@ -1737,7 +1740,7 @@ <h2 id='grid-shorthand'>
17371740
<div class='example'>
17381741
<p>In addition to accepting the 'grid-template' shorthand syntax for setting up the <i>explicit grid</i>,
17391742
the 'grid' shorthand can also easily set up parameters for an auto-formatted grid.
1740-
For example, ''grid: 1fr;'' is equivalent to
1743+
For example, ''grid: rows 1fr;'' is equivalent to
17411744
<pre>
17421745
grid-template: none;
17431746
grid-auto-columns: 1fr;

0 commit comments

Comments
 (0)