github web-platform-tests/wpt merge_pr_46059

latest releases: merge_pr_49470, epochs/three_hourly/2024-12-03_06H, epochs/six_hourly/2024-12-03_06H...
17 months ago

Part 2 - Use margin-box with 'auto' margin resolved as zero when computing the sticky limits.

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

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1488080
gecko-commit: 417324801b94c9b029c0a55cb9805dff64f127bb
gecko-reviewers: dholbert

Don't miss a new wpt release

NewReleases is sending notifications on new releases.