Skip to content

Commit 5fde09c

Browse files
committed
[css-grid] Switch to better 'grid' syntax for auto-flowing, per WG resolution.
1 parent 3c6f703 commit 5fde09c

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

css-grid/Overview.bs

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2238,7 +2238,8 @@ Grid Definition Shorthand: the 'grid' property</h2>
22382238
<pre class='propdef'>
22392239
Name: grid
22402240
Value: <<'grid-template'>> |
2241-
Value: <nobr>[ <<'grid-auto-flow'>> [ <<'grid-auto-rows'>> [ / <<'grid-auto-columns'>> ]? ]? ]</nobr>
2241+
Value: <nobr><<'grid-template-rows'>> / [ auto-flow && dense? ] <<'grid-auto-columns'>>?</nobr> |
2242+
Value: <nobr>[ auto-flow && dense? ] <<'grid-auto-rows'>>? / <<'grid-template-columns'>></nobr>
22422243
Initial: see individual properties
22432244
Applies to: <a>grid containers</a>
22442245
Inherited: see individual properties
@@ -2260,12 +2261,20 @@ Grid Definition Shorthand: the 'grid' property</h2>
22602261
beyond what 'grid-template' defines:
22612262

22622263
<dl dfn-for=grid dfn-type=value>
2263-
<dt><dfn id="grid-auto"><<'grid-auto-flow'>> [ <<'grid-auto-rows'>> [ / <<'grid-auto-columns'>> ]? ]?</dfn>
2264+
<dt><dfn id='grid-s-auto-row'><<'grid-template-rows'>> / [ auto-flow && dense? ] <<'grid-auto-columns'>>?</dfn>
2265+
<dt><dfn id='grid-s-auto-column'>[ auto-flow && dense? ] <<'grid-auto-rows'>>? / <<'grid-template-columns'>></dfn>
22642266
<dd>
2265-
Sets 'grid-auto-flow', 'grid-auto-rows', and 'grid-auto-columns' as specified.
2266-
If the <<'grid-auto-columns'>> value is omitted,
2267-
it is set to the value specified for <<'grid-auto-rows'>>.
2268-
If both are omitted, they are set to their initial values.
2267+
Sets up auto-flow,
2268+
by setting the tracks in one axis explicitly
2269+
(setting either 'grid-template-rows' or 'grid-template-columns' as specified,
2270+
and setting the other to ''grid-template-rows/none''),
2271+
and specifying how to auto-repeat the tracks in the other axis
2272+
(setting either 'grid-auto-rows' or 'grid-auto-columns' as specified,
2273+
and setting the other to ''grid-auto-rows/auto'').
2274+
'grid-auto-flow' is also set to either ''row'' or ''column'' accordingly,
2275+
with ''dense'' if it's specified.
2276+
2277+
All other properties are reset to their initial values.
22692278
</dl>
22702279

22712280
Note: Note that you can only specify the explicit <em>or</em> the implicit grid properties in a single 'grid' declaration.

0 commit comments

Comments
 (0)