@@ -1928,7 +1928,7 @@ Row and Column Gutters: the 'row-gap' and 'column-gap' properties</h3>
19281928 Initial : normal
19291929 Applies to : <a>multi-column containers</a>, <a>flex containers</a>, <a>grid containers</a>
19301930 Inherited : no
1931- Percentages : refer to corresponding dimension of the content area
1931+ Percentages : see [[#gap-percent]]
19321932 Computed value : specified keyword, else a computed <<length-percentage>> value
19331933 Animation type : by computed value type
19341934 </pre>
@@ -1955,11 +1955,8 @@ Row and Column Gutters: the 'row-gap' and 'column-gap' properties</h3>
19551955 see subsections below for details.
19561956
19571957 Negative values are invalid.
1958- <a href="https://www.w3.org/TR/css-sizing-3/#percentage-sizing">As in the min size properties and margins/paddings</a> [[CSS-SIZING-3]] ,
1959- [=cyclic percentages=] resolve against zero
1960- for determining intrinsic size contributions,
1961- but resolve against the box’s content box
1962- when laying out the box’s contents.
1958+ For percentages,
1959+ see [[#gap-percent]] .
19631960
19641961 : <dfn>normal</dfn>
19651962 :: The ''gap/normal'' represents
@@ -2040,6 +2037,39 @@ Gap Shorthand: the 'gap' property</h3>
20402037 beyond what is specified in 'gap' .
20412038 </div>
20422039
2040+ <h3 id='gap-percent'>
2041+ Percentages In 'gap' Properties</h3>
2042+
2043+ In general,
2044+ gaps introduced by the 'gap' properties
2045+ are intended to act like an empty item/track/etc
2046+ with the gap's size;
2047+ in other words,
2048+ an author should be able to reproduce the effects of 'gap'
2049+ by just inserting additional empty items/tracks/etc
2050+ into the container.
2051+
2052+ 'gap' always resolves percentages against
2053+ the corresponding size of the [=content box=]
2054+ of the element.
2055+ When this size is definite,
2056+ the behavior is well-defined
2057+ and consistent across layout modes.
2058+ But since different layout modes treat [=cyclic percentages=] for items/tracks/etc differently,
2059+ 'gap' does as well:
2060+
2061+ : In Grid Layout
2062+ ::
2063+ <a href="https://www.w3.org/TR/css-sizing-3/#percentage-sizing">As in the min size properties and margins/paddings</a> [[CSS-SIZING-3]] ,
2064+ [=cyclic percentages=] resolve against zero
2065+ for determining intrinsic size contributions,
2066+ but resolve against the box’s content box
2067+ when laying out the box’s contents.
2068+
2069+ : In Flex Layout
2070+ ::
2071+ [=Cyclic percentages=] resolve against zero in all cases.
2072+
20432073<h3 id='gap-legacy'>
20442074Legacy Gap Properties: the 'grid-row-gap', 'grid-column-gap', and 'grid-gap' properties</h3>
20452075
0 commit comments