@@ -1928,7 +1928,7 @@ Row and Column Gutters: the 'row-gap' and 'column-gap' properties</h3>
1928
1928
Initial : normal
1929
1929
Applies to : <a>multi-column containers</a>, <a>flex containers</a>, <a>grid containers</a>
1930
1930
Inherited : no
1931
- Percentages : refer to corresponding dimension of the content area
1931
+ Percentages : see [[#gap-percent]]
1932
1932
Computed value : specified keyword, else a computed <<length-percentage>> value
1933
1933
Animation type : by computed value type
1934
1934
</pre>
@@ -1955,11 +1955,8 @@ Row and Column Gutters: the 'row-gap' and 'column-gap' properties</h3>
1955
1955
see subsections below for details.
1956
1956
1957
1957
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]] .
1963
1960
1964
1961
: <dfn>normal</dfn>
1965
1962
:: The ''gap/normal'' represents
@@ -2040,6 +2037,39 @@ Gap Shorthand: the 'gap' property</h3>
2040
2037
beyond what is specified in 'gap' .
2041
2038
</div>
2042
2039
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
+
2043
2073
<h3 id='gap-legacy'>
2044
2074
Legacy Gap Properties: the 'grid-row-gap', 'grid-column-gap', and 'grid-gap' properties</h3>
2045
2075
0 commit comments