Skip to content

Commit 8688b98

Browse files
committed
[css-grid] Per WG resolution, explicitly disallow repeat() in grid-template.
1 parent 7dc0c14 commit 8688b98

1 file changed

Lines changed: 17 additions & 13 deletions

File tree

css-grid/Overview.bs

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,17 +1200,18 @@ Explicit Track Sizing: the 'grid-template-rows' and 'grid-template-columns' prop
12001200

12011201
The syntax of a <a>track list</a> is:
12021202

1203-
<pre>
1204-
<dfn>&lt;track-list></dfn> = [ <<line-names>>? [ <<track-size>> | <<track-repeat>> ] ]+ <<line-names>>?
1205-
<dfn>&lt;auto-track-list></dfn> = [ <<line-names>>? [ <<fixed-size>> | <<fixed-repeat>> ] ]* <<line-names>>? <<auto-repeat>>
1206-
[ <<line-names>>? [ <<fixed-size>> | <<fixed-repeat>> ] ]* <<line-names>>?
1207-
1208-
<dfn>&lt;track-size></dfn> = <<track-breadth>> | minmax( <<inflexible-breadth>> , <<track-breadth>> ) | fit-content( [ <<length>> | <<percentage>> ] )
1209-
<dfn>&lt;fixed-size></dfn> = <<fixed-breadth>> | minmax( <<fixed-breadth>> , <<track-breadth>> ) | minmax( <<inflexible-breadth>> , <<fixed-breadth>> )
1210-
<dfn>&lt;track-breadth></dfn> = <<length>> | <<percentage>> | <<flex>> | min-content | max-content | auto
1211-
<dfn>&lt;inflexible-breadth></dfn> = <<length>> | <<percentage>> | min-content | max-content | auto
1212-
<dfn>&lt;fixed-breadth></dfn> = <<length>> | <<percentage>>
1213-
<dfn>&lt;line-names></dfn> = '[' <<custom-ident>>* ']'
1203+
<pre class=prod>
1204+
<dfn>&lt;track-list></dfn> = [ <<line-names>>? [ <<track-size>> | <<track-repeat>> ] ]+ <<line-names>>?
1205+
<dfn>&lt;auto-track-list></dfn> = [ <<line-names>>? [ <<fixed-size>> | <<fixed-repeat>> ] ]* <<line-names>>? <<auto-repeat>>
1206+
[ <<line-names>>? [ <<fixed-size>> | <<fixed-repeat>> ] ]* <<line-names>>?
1207+
<dfn>&lt;explicit-track-list></dfn> = [ <<line-names>>? <<track-size>> ]+ <<line-names>>?
1208+
1209+
<dfn>&lt;track-size></dfn> = <<track-breadth>> | minmax( <<inflexible-breadth>> , <<track-breadth>> ) | fit-content( [ <<length>> | <<percentage>> ] )
1210+
<dfn>&lt;fixed-size></dfn> = <<fixed-breadth>> | minmax( <<fixed-breadth>> , <<track-breadth>> ) | minmax( <<inflexible-breadth>> , <<fixed-breadth>> )
1211+
<dfn>&lt;track-breadth></dfn> = <<length>> | <<percentage>> | <<flex>> | min-content | max-content | auto
1212+
<dfn>&lt;inflexible-breadth></dfn> = <<length>> | <<percentage>> | min-content | max-content | auto
1213+
<dfn>&lt;fixed-breadth></dfn> = <<length>> | <<percentage>>
1214+
<dfn>&lt;line-names></dfn> = '[' <<custom-ident>>* ']'
12141215
</pre>
12151216

12161217
Where:
@@ -1752,7 +1753,7 @@ Explicit Grid Shorthand: the 'grid-template' property</h3>
17521753
Name: grid-template
17531754
Value: none |
17541755
Value: <nobr>[ <<'grid-template-rows'>> / <<'grid-template-columns'>> ]</nobr> |
1755-
Value: <nobr>[ <<line-names>>? <<string>> <<track-size>>? <<line-names>>? ]+ [ / <<track-list>> ]?</nobr>
1756+
Value: <nobr>[ <<line-names>>? <<string>> <<track-size>>? <<line-names>>? ]+ [ / <<explicit-track-list>> ]?</nobr>
17561757
Initial: see individual properties
17571758
Applies to: <a>grid containers</a>
17581759
Inherited: see individual properties
@@ -1787,7 +1788,7 @@ Explicit Grid Shorthand: the 'grid-template' property</h3>
17871788
</pre>
17881789
</div>
17891790

1790-
<dt><dfn id='grid-template-ascii'>[ <<line-names>>? <<string>> <<track-size>>? <<line-names>>? ]+ [ / <<track-list>> ]?</dfn>
1791+
<dt><dfn id='grid-template-ascii'>[ <<line-names>>? <<string>> <<track-size>>? <<line-names>>? ]+ [ / <<explicit-track-list>> ]?</dfn>
17911792
<dd>
17921793
* Sets 'grid-template-areas' to the strings listed.
17931794
* Sets 'grid-template-rows' to the <<track-size>>s following each string
@@ -1835,6 +1836,9 @@ Explicit Grid Shorthand: the 'grid-template' property</h3>
18351836
</figcaption>
18361837
</figure>
18371838
</div>
1839+
1840+
Note: Note that the ''repeat()'' function isn't allowed in these track listings,
1841+
as the tracks are intended to visually line up one-to-one with the rows/columns in the “ASCII art”.
18381842
</dl>
18391843

18401844
Note: The 'grid' shorthand accepts the same syntax,

0 commit comments

Comments
 (0)