Skip to content

Commit d13dcc0

Browse files
committed
[css-grid] Make overlarge grid handling better.
1 parent e615309 commit d13dcc0

2 files changed

Lines changed: 160 additions & 168 deletions

File tree

css-grid/Overview.bs

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -786,14 +786,6 @@ The Explicit Grid</h2>
786786
Positive indexes count from the before/start side,
787787
while negative indexes count from the after/end side.
788788

789-
Implementations may limit the possible size of the <a>explicit grid</a>.
790-
If they do,
791-
attempting to specify an <a>explicit grid</a> larger than the implementation-defined maximum
792-
must instead define an <a>explicit grid</a> of the maximum size.
793-
Implementations may cap the <a>explicit grid</a> to slightly less than the maximum,
794-
in order to have only whole repetitions of the ''repeat()'' function.
795-
It is recommended that the maximum size of the <a>explicit grid</a> not be smaller than 1 million tracks in each axis.
796-
797789
<h3 id='track-sizing'>
798790
Track Sizing: the 'grid-template-rows' and 'grid-template-columns' properties</h3>
799791

@@ -1484,17 +1476,7 @@ The Implicit Grid</h2>
14841476
without an explicit position.
14851477
Once the <a>explicit grid</a> is filled
14861478
(or if there is no <a>explicit grid</a>)
1487-
auto-placement will also cause the generation of <a>implicit grid tracks</a>.
1488-
1489-
Implementations may limit the possible size of the <a>implicit grid</a>.
1490-
If they do,
1491-
attempting to position (or auto-position) an item past the maximum size
1492-
must instead position the item with its corresponding edge at the maximum index,
1493-
possibly overlapping other items.
1494-
Attempting to size an item to a span past the maximum size
1495-
must instead size it with a span equal to the maximum size.
1496-
It is recommended that the maximum size of the <a>implicit grid</a>
1497-
not be smaller than 1 million tracks in each axis.
1479+
auto-placement
14981480

14991481
<h3 id='auto-tracks'>
15001482
Sizing Auto-generated Rows and Columns: the 'grid-auto-rows' and 'grid-auto-columns' properties</h3>
@@ -1748,6 +1730,19 @@ Grid Definition Shorthand: the 'grid' property</h2>
17481730
</pre>
17491731
</div>
17501732

1733+
<h2 id="overlarge-grids">
1734+
Clamping Overlarge Grids</h2>
1735+
1736+
Since memory is not infinite,
1737+
UAs may clamp the the possible size of the <a>grid</a>
1738+
to within a UA-defined limit,
1739+
dropping all lines outside that limit.
1740+
If a <a>grid item</a> spans outside this limit,
1741+
its span must be clamped to the last line of the limited <a>grid</a>.
1742+
If a <a>grid item</a> is placed outside this limit,
1743+
its span must be truncated to 1
1744+
and the item repositioned into the last <a>grid track</a> on that side of the grid.
1745+
17511746
<h2 id="placement">
17521747
Placing Grid Items</h2>
17531748

0 commit comments

Comments
 (0)