Skip to content

Commit 4c48bd7

Browse files
committed
[css-grid] Generalize the allowed cap on repetitions to a an allowed limit on grid size.
1 parent 9a2b239 commit 4c48bd7

2 files changed

Lines changed: 324 additions & 294 deletions

File tree

css-grid/Overview.bs

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -726,6 +726,14 @@ The Explicit Grid</h2>
726726
Positive indexes count from the before/start side,
727727
while negative indexes count from the after/end side.
728728

729+
Implementations may limit the possible size of the <a>explicit grid</a>.
730+
If they do,
731+
attempting to specify an <a>explicit grid</a> larger than the implementation-defined maximum
732+
must instead define an <a>explicit grid</a> of the maximum size.
733+
Implementations may cap the <a>explicit grid</a> to slightly less than the maximum,
734+
in order to have only whole repetitions of the ''repeat()'' function.
735+
It is recommended that the maximum size of the <a>explicit grid</a> not be smaller than 1 million tracks in each axis.
736+
729737
<h3 id='track-sizing'>
730738
Track Sizing: the 'grid-template-rows' and 'grid-template-columns' properties</h3>
731739

@@ -952,12 +960,6 @@ Repeating Rows and Columns: the ''repeat()'' notation</h4>
952960
Note: It is expected that a future level of this specification will define a value to be inserted between the repetitions,
953961
similar to the argument of the <code>Array#join</code> method in JavaScript.
954962

955-
Implementations may cap the maximum number of repetitions they allow.
956-
If they do so, they must support at least 10000 repetitions,
957-
and if the number of repetitions is greater than the implementation's maximum,
958-
the value must be capped to the implementation's maximum
959-
(rather than being invalid, overflowing, or some other behavior).
960-
961963
<h4 id='fr-unit'>
962964
Flexible Lengths: the ''fr'' unit</h4>
963965

@@ -1418,6 +1420,16 @@ The Implicit Grid</h2>
14181420
(or if there is no <a>explicit grid</a>)
14191421
auto-placement will also cause the generation of <a>implicit grid tracks</a>.
14201422

1423+
Implementations may limit the possible size of the <a>implicit grid</a>.
1424+
If they do,
1425+
attempting to position (or auto-position) an item past the maximum size
1426+
must instead position the item with its corresponding edge at the maximum index,
1427+
possibly overlapping other items.
1428+
Attempting to size an item to a span past the maximum size
1429+
must instead size it with a span equal to the maximum size.
1430+
It is recommended that the maximum size of the <a>implicit grid</a>
1431+
not be smaller than 1 million tracks in each axis.
1432+
14211433
<h3 id='auto-tracks'>
14221434
Sizing Auto-generated Rows and Columns: the 'grid-auto-rows' and 'grid-auto-columns' properties</h3>
14231435

0 commit comments

Comments
 (0)