@@ -369,13 +369,16 @@ Characteristics of a Subgrid Item</h3>
369
369
<li id="subgrid-edge-placeholders">
370
370
For each edge of a non-empty subgrid,
371
371
to account for the subgrid’s margin/border/padding at that edge,
372
- a hypothetical item is contributed to the track sizing algorithm.
373
- This item’s sizes are taken from the sizes of the largest item
374
- with the smallest span
375
- from the occupied track closest to that edge of the subgrid,
372
+ a hypothetical item is contributed to the track sizing algorithm
373
+ for each span size
374
+ in the set of items spanning into
375
+ the occupied track closest to that edge of the subgrid.
376
+ This item’s sizes are taken from the sizes of the largest such item
377
+ of each span size,
376
378
and are additionally inflated by the subgrid’s own margin/border/padding
377
379
at that edge (or both edges,
378
- if it happens to be the most extreme item on both sides).
380
+ if it happens to be the most extreme item on both sides
381
+ and is also the smallest span size).
379
382
Similarly, the hypothetical item’s span is taken
380
383
from that same real item’s span,
381
384
and inflated by the number of empty tracks between it
@@ -387,6 +390,34 @@ Characteristics of a Subgrid Item</h3>
387
390
<a href="#subgrid-item-contribution">accounted for the subgrid’s margin/border/padding</a>
388
391
as described above.
389
392
393
+ <div class="example">
394
+ For example, in the following subgrid layout:
395
+ <pre>
396
+ 5px auto auto 5px
397
+ . aaaaaaaaa .
398
+ . bbbb cccc .
399
+ </pre>
400
+
401
+ Assuming subgrid items <var> a</var> , <var> b</var> , and <var> c</var>
402
+ occupying their corresponding grid areas
403
+ and a subgrid padding of 25px,
404
+ two hypothetical grid items would be contributed
405
+ to the track sizing algorithm
406
+ for the purpose of handling the subgrid’s inline-start padding:
407
+ one with the size of <var> b</var> plus 25px,
408
+ spanning the first two columns;
409
+ and one with the size of <var> a</var> plus 25px,
410
+ spanning the first three columns.
411
+
412
+ If only item <var> a</var> existed,
413
+ which would make it both
414
+ span into the closest occupied columns on both sides
415
+ and be the smallest-spanning item on each side,
416
+ then the hypothetical item it contributes
417
+ would be its size inflated by 50px
418
+ and would span all four columns.
419
+ </div>
420
+
390
421
<li id="subgrid-box-alignment">
391
422
The <a>subgrid</a> is always stretched in its subgridded dimension(s:
392
423
the 'align-self' /'justify-self' properties on it are ignored,
0 commit comments