Skip to content

Commit ac37030

Browse files
committed
[css-grid] Define that empty auto-fit tracks get *collapsed*, not dropped - collapsed tracks are forced to 0px, and collapsed gutters coincide. For issue w3c#172.
1 parent 1737e7f commit ac37030

1 file changed

Lines changed: 14 additions & 12 deletions

File tree

css-grid/Overview.bs

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -985,16 +985,6 @@ Non-children Grid Items</h3>
985985
and missing names are treated as <a value for="<grid-line>">auto</a>.
986986
-->
987987

988-
<h3 id="visibility-collapse">
989-
Collapsed Grid Items: the 'visibility' property</h3>
990-
991-
<p class='issue'>
992-
We want the ability to collapse grid tracks
993-
(similar to <a href="https://www.w3.org/TR/css3-flexbox/#visibility-collapse">collapsing flex items</a>
994-
or <a href="https://www.w3.org/TR/CSS21/tables.html#dynamic-effects">table rows/columns</a>),
995-
but we're not sure exactly how to do it.
996-
Ideas welcome, please <a href="mailto:www-style@w3.org?Subject=%5Bcss-grid%5D%20Collapsing%20Grid%20Tracks">post them to www-style@w3.org</a>.
997-
998988
<h3 id='order-property'>
999989
Reordered Grid Items: the 'order' property</h3>
1000990

@@ -1486,11 +1476,15 @@ Repeat-to-fill: ''auto-fill'' and ''auto-fit'' repetitions</h5>
14861476

14871477
The <dfn value for="repeat()">auto-fit</dfn> keyword behaves the same as ''auto-fill'',
14881478
except that after <a href="#auto-placement-algo">grid item placement</a>
1489-
any empty repetitions are dropped.
1479+
any empty repeated tracks are <a>collapsed</a>.
14901480
An empty track is one with no in-flow grid items placed into or spanning across it.
1491-
(This can result in <em>all</em> tracks being dropped,
1481+
(This can result in <em>all</em> tracks being <a>collapsed</a>,
14921482
if they're all empty.)
14931483

1484+
A <dfn local-lt=collapse>collapsed track</dfn> is treated as having
1485+
a fixed <a>track sizing function</a> of ''0px'',
1486+
and the <a>gutters</a> on either side of it <a lt="collapsed gutter">collapse</a>.
1487+
14941488
For the purpose of finding the number of auto-repeated tracks,
14951489
the UA must floor the track size to a UA-specified value
14961490
to avoid division by zero.
@@ -3234,6 +3228,14 @@ Gutters: the 'grid-column-gap', 'grid-row-gap', and 'grid-gap' properties</h3>
32343228
(In particular, there is no <a>gutter</a> between the first/last track of the <a>implicit grid</a>
32353229
and the “auto” lines in the <a>augmented grid</a>.)
32363230

3231+
When a <a>collapsed track</a>’s gutters <dfn lt="collapsed gutter">collapse</dfn>,
3232+
they coincide exactly--
3233+
the two gutters overlap so that their start and end edges coincide.
3234+
If one side of a <a>collapsed</a> track does not have a gutter
3235+
(e.g. if it is the first or last track of the <a>implicit grid</a>),
3236+
then collapsing its gutters results in no gutter
3237+
on either “side” of the <a>collapsed track</a>.
3238+
32373239
<pre class='propdef'>
32383240
Name: grid-gap
32393241
Value: <<'grid-row-gap'>> <<'grid-column-gap'>>?

0 commit comments

Comments
 (0)