@@ -1587,19 +1587,21 @@ Self-Alignment Shorthand: the 'place-items' property</h3>
1587
1587
<h2 id='gaps'>
1588
1588
Gaps Between Boxes</h2>
1589
1589
1590
- While 'margin' and 'padding' can be used to specify visual separation between individual boxes,
1591
- it's sometimes more desirable to specify a "global" separation between entire groups of boxes
1592
- within a given layout context.
1593
- For example, an author may want some amount of empty space
1594
- between the columns in the <a>multi-column element</a> ,
1595
- without having to individually tune the margins on every single child of the multicol.
1590
+ While 'margin' and 'padding' can be used to specify visual spacing around individual boxes,
1591
+ it's sometimes more convenient to globally specify spacing between adjacent boxes
1592
+ within a given layout context,
1593
+ particularly when the spacing is different between boxes
1594
+ as opposed to between the first/last box and the container's edge.
1596
1595
1597
1596
The 'gap' property,
1598
1597
and its 'row-gap' and 'column-gap' sub-properties,
1599
- provide this functionality for some layout modes.
1598
+ provide this functionality for
1599
+ <a href="http://www.w3.org/TR/css3-multicol/">multi-column</a>
1600
+ <a href="http://www.w3.org/TR/css-flexbox/">flex</a> ,
1601
+ and <a href="http://www.w3.org/TR/css-grid/">grid layout</a> .
1600
1602
1601
1603
<h3 id='column-row-gap'>
1602
- The 'column-gap', 'row-gap', and 'gap' Properties </h3>
1604
+ Row and Column Gutters: the 'row-gap' and 'column- gap' properties </h3>
1603
1605
1604
1606
<pre class='propdef'>
1605
1607
Name : row-gap, column-gap
@@ -1613,30 +1615,32 @@ The 'column-gap', 'row-gap', and 'gap' Properties</h3>
1613
1615
Animatable : as length, percentage, or calc
1614
1616
</pre>
1615
1617
1616
- These properties specify the <dfn export lt="gutter">gutters</dfn>
1618
+ These properties specify fixed-length <dfn export lt="gutter">gutters</dfn>
1617
1619
between items in the container,
1618
- similar to the <a>content-distribution properties</a> .
1620
+ adding space in a manner to the ''justify-content/space-between'' keyword
1621
+ of the <a>content-distribution properties</a> ,
1622
+ but of a fixed size instead of as a fraction of remaining space.
1623
+
1619
1624
Different layout modes interpret these slightly differently:
1620
- for Multicol Layout, it's the spacing between column boxes;
1625
+ for Multi-column Layout, it's a minimum spacing between column boxes;
1621
1626
for Flex Layout, it's a minimum spacing between <a>flex items</a>
1622
1627
and/or <a>flex lines</a> ;
1623
1628
for Grid Layout, it's a minimum spacing between <a>grid tracks</a> .
1624
-
1625
1629
Regardless of layout mode, however,
1626
1630
the directions that these two properties apply in are constant.
1627
- 'column-gap' indicates spacing between " columns" --
1631
+ 'column-gap' indicates spacing between “ columns” --
1628
1632
it separates boxes in the container's <a>inline axis</a> ,
1629
1633
similar to <a>inline-axis</a> 'margin' --
1630
- while 'row-gap' indicates spacing between " rows" ,
1634
+ while 'row-gap' indicates spacing between “ rows” ,
1631
1635
separating boxes in the container's <a>block axis</a> .
1632
1636
1633
- Their values are defined as :
1637
+ Values have the following meanings :
1634
1638
1635
1639
<dl dfn-type=value dfn-for="row-gap, column-gap, gap">
1636
1640
: <<length-percentage>>
1637
1641
::
1638
- Specifies a gap between " rows" or " columns".
1639
- Precisely what this means is defined by each layout mode ;
1642
+ Specifies a gap between “ rows” or “ columns”,
1643
+ as defined by the layout modes to which it applies ;
1640
1644
see subsections below for details.
1641
1645
1642
1646
Negative values are invalid.
@@ -1648,6 +1652,8 @@ The 'column-gap', 'row-gap', and 'gap' Properties</h3>
1648
1652
Issue: Should ''gap/normal'' just compute to ''1em'' in multicol?
1649
1653
</dl>
1650
1654
1655
+ Note: Additional spacing may be added by 'justify-content' /'align-content' .
1656
+ This space effectively increases the size of these <a>gutters</a> .
1651
1657
1652
1658
<h4 id='gap-multicol'>
1653
1659
Multicol Containers</h4>
@@ -1671,20 +1677,16 @@ Grid Containers</h4>
1671
1677
define the [=gutters=] between <a>grid rows</a> and <a>grid columns</a> .
1672
1678
See [[css-grid-1#gutters]] for precise details on how this works.
1673
1679
1674
- The ''gap/normal'' value behaves as ''0'' for both properties.
1675
-
1676
1680
<h4 id='gap-table'>
1677
1681
Tables</h4>
1678
1682
1679
1683
Table boxes do not use the 'gap' properties to specify separation between their cells.
1680
1684
Instead, they use the 'border-spacing' property,
1681
- which has slightly different functionality--
1685
+ which has slightly different functionality:
1682
1686
it inherits,
1683
- and it also specifies the separation between the outermost cells
1684
- and the border of the table.
1685
- (The 'gap' properties only specify separation between boxes in the container;
1686
- they rely on the author using 'padding' if they want separation
1687
- between the container's border and its contents.)
1687
+ and it also specifies the additional spacing between the outermost cells
1688
+ and the border of the table
1689
+ (similar to ''space-evenly'' rather than ''space-between'' ).
1688
1690
1689
1691
<h3 id='gap-shorthand'>
1690
1692
Gap Shorthand: the 'gap' property</h3>
@@ -1721,7 +1723,7 @@ Legacy Gap Properties: the 'grid-row-gap', 'grid-column-gap', and 'grid-gap' pro
1721
1723
1722
1724
The Grid Layout module was originally written with its own set of [=gutter=] properties,
1723
1725
before all such properties were unified into the existing 'row-gap' /'column-gap' naming.
1724
- For legacy compatibility ,
1726
+ For compatibility with legacy content ,
1725
1727
those legacy property names must be supported as aliases:
1726
1728
1727
1729
* <dfn property>grid-row-gap</dfn> must be treated as a shorthand for the 'row-gap' property
@@ -1731,7 +1733,6 @@ Legacy Gap Properties: the 'grid-row-gap', 'grid-column-gap', and 'grid-gap' pro
1731
1733
In all three cases, the legacy properties must take the same grammar as the property they are aliasing,
1732
1734
and just "forward" the value to their aliased property.
1733
1735
1734
-
1735
1736
<!--
1736
1737
████████ ███ ██████ ████████ ██ ████ ██ ██ ████████
1737
1738
██ ██ ██ ██ ██ ██ ██ ██ ██ ███ ██ ██
0 commit comments