mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-15 17:55:15 -10:00
In block or flex layout, an 'auto' margin can be used to align the element by consuming rest of the space of a particular side in its container [1]. However, if we used the resolved 'auto' margin as part of the element's margin-box, it won't stick within its scroll container if the margin is larger than the scroll container's size in that dimension. Bug 1488080 comment 15 has more explanation. The spec requires all 'auto' margin on the box are treated as zero when computing Static-Position Rectangle [2] (See the requirement at the end of this section). [1] https://drafts.csswg.org/css-flexbox-1/#auto-margins [2] https://drafts.csswg.org/css-position/#staticpos-rect Differential Revision: https://phabricator.services.mozilla.com/D209097