Skip to content

Commit e1ef850

Browse files
committed
[css-grid] Add grid-placement properties summary table.
--HG-- extra : rebase_source : 359a24366c8d84ee1a783a3b40cf263a69e1e517
1 parent 9bd5c94 commit e1ef850

2 files changed

Lines changed: 57 additions & 25 deletions

File tree

css-grid/Overview.html

Lines changed: 38 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,10 @@ <h2 class="no-num no-toc no-ref heading settled heading" id=contents><span class
122122
Automatic Grid Item Placement Algorithm</a></ul><li><a href=#grid-auto-position-property><span class=secno>6.3</span>
123123
Default Position: the <span class=property data-link-type=propdesc title=grid-auto-position>grid-auto-position</span> property</a></ul><li><a href=#grid-shorthand><span class=secno>7</span>
124124
Grid Definition Shorthand: the <span class=property data-link-type=propdesc title=grid>grid</span> property</a><li><a href=#placement><span class=secno>8</span>
125-
Placing Grid Items</a><ul class=toc><li><a href=#line-placement><span class=secno>8.1</span>
126-
Line-based Placement: the <span class=property data-link-type=propdesc title=grid-row-start>grid-row-start</span>, <span class=property data-link-type=propdesc title=grid-column-start>grid-column-start</span>, <span class=property data-link-type=propdesc title=grid-row-end>grid-row-end</span>, and <span class=property data-link-type=propdesc title=grid-column-end>grid-column-end</span> properties</a><ul class=toc><li><a href=#grid-placement-errors><span class=secno>8.1.1</span>
127-
Grid Placement Error Handling</a></ul><li><a href=#placement-shorthands><span class=secno>8.2</span>
125+
Placing Grid Items</a><ul class=toc><li><a href=#common-uses><span class=secno>8.1</span>
126+
Common Values for Grid Placement</a><li><a href=#line-placement><span class=secno>8.2</span>
127+
Line-based Placement: the <span class=property data-link-type=propdesc title=grid-row-start>grid-row-start</span>, <span class=property data-link-type=propdesc title=grid-column-start>grid-column-start</span>, <span class=property data-link-type=propdesc title=grid-row-end>grid-row-end</span>, and <span class=property data-link-type=propdesc title=grid-column-end>grid-column-end</span> properties</a><ul class=toc><li><a href=#grid-placement-errors><span class=secno>8.2.1</span>
128+
Grid Placement Error Handling</a></ul><li><a href=#placement-shorthands><span class=secno>8.3</span>
128129
Placement Shorthands: the <span class=property data-link-type=propdesc title=grid-column>grid-column</span>, <span class=property data-link-type=propdesc title=grid-row>grid-row</span>, and <span class=property data-link-type=propdesc title=grid-area>grid-area</span> properties</a></ul><li><a href=#abspos-items><span class=secno>9</span>
129130
Absolutely-positioned Grid Items</a><li><a href=#alignment><span class=secno>10</span>
130131
Alignment</a><ul class=toc><li><a href=#auto-margins><span class=secno>10.1</span>
@@ -1813,10 +1814,27 @@ <h2 class="heading settled heading" data-level=8 id=placement><span class=secno>
18131814
<td><a data-link-type=dfn href=#subgrid title=subgrid>Subgrid</a> without an explicit or implied span
18141815
</table>
18151816

1816-
<p class=issue id=issue-5b898f6f><a class=self-link href=#issue-5b898f6f></a>
1817-
Put in "common uses" section, like <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-flexbox-1/#propdef-flex title=flex>flex</a> has, to describe what you would use <a class=property data-link-type=propdesc href=#propdef-grid-area title=grid-area>grid-area</a> for, etc.
1817+
<h3 class="heading settled heading" data-level=8.1 id=common-uses><span class=secno>8.1 </span><span class=content>
1818+
Common Values for Grid Placement</span><a class=self-link href=#common-uses></a></h3>
18181819

1819-
<h3 class="heading settled heading" data-level=8.1 id=line-placement><span class=secno>8.1 </span><span class=content>
1820+
<p> <em>This section is informative.</em>
1821+
1822+
<p> The <a data-link-type=dfn href=#grid-placement-property title="grid-placement property">grid-placement property</a> longhands are organized into three shorthands:
1823+
1824+
<table class=data rules=all>
1825+
<tr>
1826+
<td colspan=4><a class=property data-link-type=propdesc href=#propdef-grid-area title=grid-area>grid-area</a>
1827+
<tr>
1828+
<td colspan=2><a class=property data-link-type=propdesc href=#propdef-grid-column title=grid-column>grid-column</a>
1829+
<td colspan=2><a class=property data-link-type=propdesc href=#propdef-grid-row title=grid-row>grid-row</a>
1830+
<tr>
1831+
<td width=25%><a class=property data-link-type=propdesc href=#propdef-grid-column-start title=grid-column-start>grid-column-start</a>
1832+
<td width=25%><a class=property data-link-type=propdesc href=#propdef-grid-column-end title=grid-column-end>grid-column-end</a>
1833+
<td width=25%><a class=property data-link-type=propdesc href=#propdef-grid-row-start title=grid-row-start>grid-row-start</a>
1834+
<td width=25%><a class=property data-link-type=propdesc href=#propdef-grid-row-end title=grid-row-end>grid-row-end</a>
1835+
</table>
1836+
1837+
<h3 class="heading settled heading" data-level=8.2 id=line-placement><span class=secno>8.2 </span><span class=content>
18201838
Line-based Placement: the <a class=property data-link-type=propdesc href=#propdef-grid-row-start title=grid-row-start>grid-row-start</a>, <a class=property data-link-type=propdesc href=#propdef-grid-column-start title=grid-column-start>grid-column-start</a>, <a class=property data-link-type=propdesc href=#propdef-grid-row-end title=grid-row-end>grid-row-end</a>, and <a class=property data-link-type=propdesc href=#propdef-grid-column-end title=grid-column-end>grid-column-end</a> properties</span><a class=self-link href=#line-placement></a></h3>
18211839

18221840
<table class=propdef><tr><th>Name:<td><dfn class=css-code data-dfn-type=property data-export="" id=propdef-grid-row-start>grid-row-start<a class=self-link href=#propdef-grid-row-start></a></dfn>, <dfn class=css-code data-dfn-type=property data-export="" id=propdef-grid-column-start>grid-column-start<a class=self-link href=#propdef-grid-column-start></a></dfn>, <dfn class=css-code data-dfn-type=property data-export="" id=propdef-grid-row-end>grid-row-end<a class=self-link href=#propdef-grid-row-end></a></dfn>, <dfn class=css-code data-dfn-type=property data-export="" id=propdef-grid-column-end>grid-column-end<a class=self-link href=#propdef-grid-column-end></a></dfn><tr><th>Value:<td><a class="production css-code" data-link-type=type href=#typedef-grid-line title="<grid-line>">&lt;grid-line&gt;</a><tr><th>Initial:<td>auto<tr><th>Applies to:<td><a data-link-type=dfn href=#grid-item title="grid items">grid items</a><tr><th>Inherited:<td>no<tr><th>Media:<td>visual<tr><th>Computed value:<td>specified value (almost)<tr><th>Percentages:<td>n/a</table>
@@ -1937,7 +1955,7 @@ <h3 class="heading settled heading" data-level=8.1 id=line-placement><span class
19371955
/* Line 5 to line 6 */
19381956
</pre> </div>
19391957

1940-
<h4 class="heading settled heading" data-level=8.1.1 id=grid-placement-errors><span class=secno>8.1.1 </span><span class=content>
1958+
<h4 class="heading settled heading" data-level=8.2.1 id=grid-placement-errors><span class=secno>8.2.1 </span><span class=content>
19411959
Grid Placement Error Handling</span><a class=self-link href=#grid-placement-errors></a></h4>
19421960

19431961
<p> If <a class=property data-link-type=propdesc href=#propdef-grid-row-end title=grid-row-end>grid-row-end</a>/<a class=property data-link-type=propdesc href=#propdef-grid-column-end title=grid-column-end>grid-column-end</a> specifies a line at or before that specified by <a class=property data-link-type=propdesc href=#propdef-grid-row-start title=grid-row-start>grid-row-start</a>/<a class=property data-link-type=propdesc href=#propdef-grid-column-start title=grid-column-start>grid-column-start</a>,
@@ -1952,7 +1970,7 @@ <h4 class="heading settled heading" data-level=8.1.1 id=grid-placement-errors><s
19521970
in a given dimension,
19531971
instead treat the <a data-link-type=dfn href=#grid-span title="grid span">grid span</a> as one.
19541972

1955-
<h3 class="heading settled heading" data-level=8.2 id=placement-shorthands><span class=secno>8.2 </span><span class=content>
1973+
<h3 class="heading settled heading" data-level=8.3 id=placement-shorthands><span class=secno>8.3 </span><span class=content>
19561974
Placement Shorthands: the <a class=property data-link-type=propdesc href=#propdef-grid-column title=grid-column>grid-column</a>, <a class=property data-link-type=propdesc href=#propdef-grid-row title=grid-row>grid-row</a>, and <a class=property data-link-type=propdesc href=#propdef-grid-area title=grid-area>grid-area</a> properties</span><a class=self-link href=#placement-shorthands></a></h3>
19571975

19581976
<table class=propdef><tr><th>Name:<td><dfn class=css-code data-dfn-type=property data-export="" id=propdef-grid-column>grid-column<a class=self-link href=#propdef-grid-column></a></dfn>, <dfn class=css-code data-dfn-type=property data-export="" id=propdef-grid-row>grid-row<a class=self-link href=#propdef-grid-row></a></dfn><tr><th>Value:<td><a class="production css-code" data-link-type=type href=#typedef-grid-line title="<grid-line>">&lt;grid-line&gt;</a> [ / <a class="production css-code" data-link-type=type href=#typedef-grid-line title="<grid-line>">&lt;grid-line&gt;</a> ]?<tr><th>Initial:<td>see individual properties<tr><th>Applies to:<td><a data-link-type=dfn href=#grid-item title="grid items">grid items</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>
@@ -2867,7 +2885,7 @@ <h2 class="no-num no-ref heading settled heading" id=index><span class=content>
28672885
Index</span><a class=self-link href=#index></a></h2>
28682886
<div data-fill-with=index><ul class=indexlist>
28692887
<li>auto<ul><li>value for grid-template-columns, grid-template-rows, <a href=#valuedef-auto title="section 5.1">5.1</a>
2870-
<li>value for &lt;grid-line&gt;, <a href=#grid-placement-auto title="section 8.1">8.1</a>
2888+
<li>value for &lt;grid-line&gt;, <a href=#grid-placement-auto title="section 8.2">8.2</a>
28712889
</ul><li>automatic column position, <a href=#automatic-grid-positionautomatic-row-positionautomatic-column-positionautomatic-position title="section 8">8</a>
28722890
<li>automatic column span, <a href=#automatic-grid-spanautomatic-row-spanautomatic-column-spanautomatic-span title="section 8">8</a>
28732891
<li>automatic grid position, <a href=#automatic-grid-positionautomatic-row-positionautomatic-column-positionautomatic-position title="section 8">8</a>
@@ -2900,32 +2918,32 @@ <h2 class="no-num no-ref heading settled heading" id=index><span class=content>
29002918
<li>grid<ul><li>definition of, <a href=#grid title="section 2">2</a>
29012919
<li>value for display, <a href=#valuedef-grid title="section 3.1">3.1</a>
29022920
<li>(property), <a href=#propdef-grid title="section 7">7</a>
2903-
</ul><li>grid-area, <a href=#propdef-grid-area title="section 8.2">8.2</a>
2921+
</ul><li>grid-area, <a href=#propdef-grid-area title="section 8.3">8.3</a>
29042922
<li>grid area, <a href=#grid-area title="section 2.3">2.3</a>
29052923
<li>grid-auto-columns, <a href=#propdef-grid-auto-columns title="section 6.1">6.1</a>
29062924
<li>grid-auto-flow, <a href=#propdef-grid-auto-flow title="section 6.2">6.2</a>
29072925
<li>grid-auto-position, <a href=#propdef-grid-auto-position title="section 6.3">6.3</a>
29082926
<li>grid-auto-rows, <a href=#propdef-grid-auto-rows title="section 6.1">6.1</a>
29092927
<li>grid cell, <a href=#grid-cell title="section 2.1">2.1</a>
29102928
<li>grid column, <a href=#grid-column--column title="section 2">2</a>
2911-
<li>grid-column, <a href=#propdef-grid-column title="section 8.2">8.2</a>
2912-
<li>grid-column-end, <a href=#propdef-grid-column-end title="section 8.1">8.1</a>
2929+
<li>grid-column, <a href=#propdef-grid-column title="section 8.3">8.3</a>
2930+
<li>grid-column-end, <a href=#propdef-grid-column-end title="section 8.2">8.2</a>
29132931
<li>grid column line, <a href=#grid-line title="section 2.2">2.2</a>
2914-
<li>grid-column-start, <a href=#propdef-grid-column-start title="section 8.1">8.1</a>
2932+
<li>grid-column-start, <a href=#propdef-grid-column-start title="section 8.2">8.2</a>
29152933
<li>grid container, <a href=#grid-container title="section 3.1">3.1</a>
29162934
<li>grid formatting context, <a href=#grid-formatting-context title="section 3.1">3.1</a>
29172935
<li>grid item, <a href=#grid-item title="section 4">4</a>
29182936
<li>grid layout, <a href=#grid-layout title="section 2">2</a>
29192937
<li>grid line, <a href=#grid-line title="section 2.2">2.2</a>
2920-
<li>&lt;grid-line&gt;, <a href=#typedef-grid-line title="section 8.1">8.1</a>
2938+
<li>&lt;grid-line&gt;, <a href=#typedef-grid-line title="section 8.2">8.2</a>
29212939
<li>grid placement, <a href=#grid-placementplacement title="section 8">8</a>
29222940
<li>grid-placement property, <a href=#grid-placement-property title="section 8">8</a>
29232941
<li>grid position, <a href=#grid-position title="section 8">8</a>
29242942
<li>grid row, <a href=#grid-row--row title="section 2">2</a>
2925-
<li>grid-row, <a href=#propdef-grid-row title="section 8.2">8.2</a>
2926-
<li>grid-row-end, <a href=#propdef-grid-row-end title="section 8.1">8.1</a>
2943+
<li>grid-row, <a href=#propdef-grid-row title="section 8.3">8.3</a>
2944+
<li>grid-row-end, <a href=#propdef-grid-row-end title="section 8.2">8.2</a>
29272945
<li>grid row line, <a href=#grid-line title="section 2.2">2.2</a>
2928-
<li>grid-row-start, <a href=#propdef-grid-row-start title="section 8.1">8.1</a>
2946+
<li>grid-row-start, <a href=#propdef-grid-row-start title="section 8.2">8.2</a>
29292947
<li>grid span, <a href=#grid-span title="section 8">8</a>
29302948
<li>grid-template, <a href=#propdef-grid-template title="section 5.3">5.3</a>
29312949
<li>grid-template-areas, <a href=#propdef-grid-template-areas title="section 5.2">5.2</a>
@@ -2934,15 +2952,15 @@ <h2 class="no-num no-ref heading settled heading" id=index><span class=content>
29342952
<li>grid-template-rows, <a href=#propdef-grid-template-rows title="section 5.1">5.1</a>
29352953
<li>Grid track, <a href=#grid-track title="section 2.1">2.1</a>
29362954
<li>hypothetical 1fr size, <a href=#hypothetical-1fr-size title="section 5.1.3">5.1.3</a>
2937-
<li>&lt;ident&gt;, <a href=#grid-placement-slot title="section 8.1">8.1</a>
2955+
<li>&lt;ident&gt;, <a href=#grid-placement-slot title="section 8.2">8.2</a>
29382956
<li>implicit grid, <a href=#implicit-grid title="section 6">6</a>
29392957
<li>implicit grid column, <a href=#implicit-grid-trackimplicit-grid-rowimplicit-grid-column title="section 6.1">6.1</a>
29402958
<li>implicit grid row, <a href=#implicit-grid-trackimplicit-grid-rowimplicit-grid-column title="section 6.1">6.1</a>
29412959
<li>implicit grid track, <a href=#implicit-grid-trackimplicit-grid-rowimplicit-grid-column title="section 6.1">6.1</a>
29422960
<li>implicit named area, <a href=#implicit-named-area title="section 5.2.2">5.2.2</a>
29432961
<li>implicit named line, <a href=#implicit-named-line title="section 5.2.1">5.2.1</a>
29442962
<li>inline-grid, <a href=#valuedef-inline-grid title="section 3.1">3.1</a>
2945-
<li>&lt;integer&gt; &amp;&amp; &lt;ident&gt;?, <a href=#grid-placement-int title="section 8.1">8.1</a>
2963+
<li>&lt;integer&gt; &amp;&amp; &lt;ident&gt;?, <a href=#grid-placement-int title="section 8.2">8.2</a>
29462964
<li>&lt;length&gt;, <a href=#valuedef-length title="section 5.1">5.1</a>
29472965
<li>&lt;line-name-list&gt;, <a href=#typedef-line-name-list title="section 5.1">5.1</a>
29482966
<li>&lt;line-names&gt;, <a href=#typedef-line-names title="section 5.1">5.1</a>
@@ -2969,7 +2987,7 @@ <h2 class="no-num no-ref heading settled heading" id=index><span class=content>
29692987
<li>rows, <a href=#valuedef-rows title="section 6.2">6.2</a>
29702988
<li>sizing function, <a href=#sizing-function title="section 5.1">5.1</a>
29712989
<li>SpanCount, <a href=#SpanCount-definition title="section 11.1">11.1</a>
2972-
<li>span &amp;&amp; [ &lt;integer&gt; || &lt;ident&gt; ], <a href=#grid-placement-span-int title="section 8.1">8.1</a>
2990+
<li>span &amp;&amp; [ &lt;integer&gt; || &lt;ident&gt; ], <a href=#grid-placement-span-int title="section 8.2">8.2</a>
29732991
<li>&lt;string&gt;+, <a href=#valuedef-string title="section 5.2">5.2</a>
29742992
<li>subgrid<ul><li>value for grid-template-rows, grid-template-columns, <a href=#valuedef-subgrid title="section 5.1">5.1</a>
29752993
<li>definition of, <a href=#subgrid title="section 5.1.4">5.1.4</a>
@@ -3029,9 +3047,6 @@ <h2 class="no-num heading settled" id=issues-index><span class=content>Issues In
30293047
instead of always using 1,1 by default.
30303048

30313049
<a href=#issue-f3c0c9fd></a><p class=issue>
3032-
Put in "common uses" section, like <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-flexbox-1/#propdef-flex title=flex>flex</a> has, to describe what you would use <a class=property data-link-type=propdesc href=#propdef-grid-area title=grid-area>grid-area</a> for, etc.
3033-
3034-
<a href=#issue-5b898f6f></a><p class=issue>
30353050
Should <a class=property data-link-type=propdesc href=#propdef-grid-area title=grid-area>grid-area</a> be <a class=property data-link-type=propdesc title=grid-field>grid-field</a>?
30363051

30373052

css-grid/Overview.src.html

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1860,8 +1860,25 @@ <h2 id="placement">
18601860
<td><a>Subgrid</a> without an explicit or implied span
18611861
</table>
18621862

1863-
<p class='issue'>
1864-
Put in "common uses" section, like 'flex' has, to describe what you would use 'grid-area' for, etc.
1863+
<h3 id='common-uses'>
1864+
Common Values for Grid Placement</h3>
1865+
1866+
<em>This section is informative.</em>
1867+
1868+
The <a>grid-placement property</a> longhands are organized into three shorthands:
1869+
1870+
<table rules=all class=data>
1871+
<tr>
1872+
<td colspan=4>'grid-area'
1873+
<tr>
1874+
<td colspan=2>'grid-column'
1875+
<td colspan=2>'grid-row'
1876+
<tr>
1877+
<td width=25%>'grid-column-start'
1878+
<td width=25%>'grid-column-end'
1879+
<td width=25%>'grid-row-start'
1880+
<td width=25%>'grid-row-end'
1881+
</table>
18651882

18661883
<h3 id='line-placement'>
18671884
Line-based Placement: the 'grid-row-start', 'grid-column-start', 'grid-row-end', and 'grid-column-end' properties</h3>

0 commit comments

Comments
 (0)