Skip to content

Commit 0f21024

Browse files
committed
[css-grid] Add a note about how 'grid' works with its two branches.
1 parent 94b3f2d commit 0f21024

2 files changed

Lines changed: 26 additions & 20 deletions

File tree

css-grid/Overview.bs

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1805,16 +1805,19 @@ Grid Definition Shorthand: the 'grid' property</h2>
18051805
Computed value: see individual properties
18061806
</pre>
18071807

1808-
<p>
1809-
The 'grid' property is a shorthand that sets
1810-
all of the explicit grid properties
1811-
('grid-template-rows', 'grid-template-columns', and 'grid-template-areas')
1812-
as well as all the implicit grid properties
1813-
('grid-auto-rows', 'grid-auto-columns', and 'grid-auto-flow')
1814-
in a single declaration.
1815-
If <<'grid-auto-rows'>> value is omitted,
1816-
it is set to the value specified for 'grid-auto-columns'.
1817-
Other omitted values are set to their initial values.
1808+
The 'grid' property is a shorthand that sets
1809+
all of the explicit grid properties
1810+
('grid-template-rows', 'grid-template-columns', and 'grid-template-areas')
1811+
as well as all the implicit grid properties
1812+
('grid-auto-rows', 'grid-auto-columns', and 'grid-auto-flow')
1813+
in a single declaration.
1814+
If <<'grid-auto-rows'>> value is omitted,
1815+
it is set to the value specified for 'grid-auto-columns'.
1816+
Other omitted values are set to their initial values.
1817+
1818+
Note: Note that you can only specify the explicit <em>or</em> the implicit grid properties in a single 'grid' declaration.
1819+
The sub-properties you don't specify are set to their initial value,
1820+
as normal for shorthands.
18181821

18191822
<div class='example'>
18201823
<p>In addition to accepting the 'grid-template' shorthand syntax for setting up the <i>explicit grid</i>,

css-grid/Overview.html

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1845,16 +1845,19 @@ <h2 class="heading settled heading" data-level=7 id=grid-shorthand><span class=s
18451845
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>
18461846

18471847
<table class="definition propdef"><tr><th>Name:<td><dfn class=css-code data-dfn-type=property data-export="" id=propdef-grid>grid<a class=self-link href=#propdef-grid></a></dfn><tr><th>Value:<td class=prod><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 data-link-type=dfn href=#grid-container title="grid containers">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>
1848-
<p>
1849-
The <a class=property data-link-type=propdesc href=#propdef-grid title=grid>grid</a> property is a shorthand that sets
1850-
all of the explicit grid properties
1851-
(<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>, and <a class=property data-link-type=propdesc href=#propdef-grid-template-areas title=grid-template-areas>grid-template-areas</a>)
1852-
as well as all the implicit grid properties
1853-
(<a class=property data-link-type=propdesc href=#propdef-grid-auto-rows title=grid-auto-rows>grid-auto-rows</a>, <a class=property data-link-type=propdesc href=#propdef-grid-auto-columns title=grid-auto-columns>grid-auto-columns</a>, and <a class=property data-link-type=propdesc href=#propdef-grid-auto-flow title=grid-auto-flow>grid-auto-flow</a>)
1854-
in a single declaration.
1855-
If <a class=production data-link-type=propdesc href=#propdef-grid-auto-rows title=grid-auto-rows>&lt;‘grid-auto-rows’&gt;</a> value is omitted,
1856-
it is set to the value specified for <a class=property data-link-type=propdesc href=#propdef-grid-auto-columns title=grid-auto-columns>grid-auto-columns</a>.
1857-
Other omitted values are set to their initial values.
1848+
<p> The <a class=property data-link-type=propdesc href=#propdef-grid title=grid>grid</a> property is a shorthand that sets
1849+
all of the explicit grid properties
1850+
(<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>, and <a class=property data-link-type=propdesc href=#propdef-grid-template-areas title=grid-template-areas>grid-template-areas</a>)
1851+
as well as all the implicit grid properties
1852+
(<a class=property data-link-type=propdesc href=#propdef-grid-auto-rows title=grid-auto-rows>grid-auto-rows</a>, <a class=property data-link-type=propdesc href=#propdef-grid-auto-columns title=grid-auto-columns>grid-auto-columns</a>, and <a class=property data-link-type=propdesc href=#propdef-grid-auto-flow title=grid-auto-flow>grid-auto-flow</a>)
1853+
in a single declaration.
1854+
If <a class=production data-link-type=propdesc href=#propdef-grid-auto-rows title=grid-auto-rows>&lt;‘grid-auto-rows’&gt;</a> value is omitted,
1855+
it is set to the value specified for <a class=property data-link-type=propdesc href=#propdef-grid-auto-columns title=grid-auto-columns>grid-auto-columns</a>.
1856+
Other omitted values are set to their initial values.
1857+
1858+
<p class=note> Note: Note that you can only specify the explicit <em>or</em> the implicit grid properties in a single <a class=property data-link-type=propdesc href=#propdef-grid title=grid>grid</a> declaration.
1859+
The sub-properties you don’t specify are set to their initial value,
1860+
as normal for shorthands.
18581861

18591862
<div class=example>
18601863
<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 data-link-type=dfn href=#explicit-grid title="explicit grid">explicit grid</a>,

0 commit comments

Comments
 (0)