@@ -4086,21 +4086,24 @@ Gutters: the 'row-gap', 'column-gap', and 'gap' properties</h3>
40864086<h3 id='auto-margins'>
40874087Aligning with <a value for="margin">auto</a> margins</h3>
40884088
4089- <em> This section is non-normative.
4090- The normative definition of how margins affect grid items is in [[#layout-algorithm]] .</em>
4091-
4092- Auto margins on <a>grid items</a> have an effect very similar to auto margins in block flow:
4089+ Auto [=margins=] on <a>grid items</a> have an effect
4090+ very similar to auto margins in [=block layout=] :
40934091
40944092 <ul>
40954093 <li>
4096- During calculations of <a>grid track</a> sizes, auto margins are treated as ''0'' .
4094+ During calculations of <a>grid track</a> sizes,
4095+ ''margin/auto'' margins are treated as ''0'' .
40974096
40984097 <li>
4099- ''margin/auto'' margins absorb positive free space
4100- prior to alignment via the <a>box alignment properties</a> .
4098+ As defined for the [=inline axis=] of [=block layout=]
4099+ (see <a href="https://www.w3.org/TR/CSS2/visudet.html#blockwidth">CSS2§10.3.3</a> ),
4100+ ''margin/auto'' margins in either axis absorb positive free space
4101+ prior to alignment via the <a>box alignment properties</a> ,
4102+ thereby disabling the effects of any [=self-alignment properties=]
4103+ in that axis.
41014104
41024105 <li>
4103- Overflowing elements ignore their ''margin/auto'' margins
4106+ Overflowing [=grid items=] resolve their ''margin/auto'' margins to zero
41044107 and overflow as specified by their <a>box alignment properties</a> .
41054108 </ul>
41064109
@@ -5330,6 +5333,10 @@ Changes since the <a href="https://www.w3.org/TR/2020/CRD-css-grid-2-20201218/">
53305333 now that [=non-replaced elements=] can also have an aspect ratio
53315334 via 'aspect-ratio' . [[CSS-SIZING-4]]
53325335 (<a href="https://github.com/w3c/csswg-drafts/issues/6069">Issue 6069</a> )
5336+ <li id="change-2020-auto-margins">
5337+ Made [[#auto-margins]] normative and tightened up wording,
5338+ since some aspects of this behavior were not otherwise defined elsewhere.
5339+ (part of <a href="https://github.com/w3c/csswg-drafts/issues/5923">Issue 5923</a> )
53335340 </ul>
53345341
53355342<h3 id="changes-202008">
0 commit comments