Closed Bug 1957739 Opened 28 days ago Closed 22 days ago

[wpt-sync] Sync PR 51773 - layout: Allow collapsing bottom margins with any indefinite block size

Categories

(Core :: CSS Parsing and Computation, task, P4)

task

Tracking

()

RESOLVED FIXED
139 Branch
Tracking Status
firefox139 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 51773 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/51773
Details from upstream follow.

Oriol Brufau <obrufau@igalia.com> wrote:

layout: Allow collapsing bottom margins with any indefinite block size

According to CSS2, the bottom margin of a block container can collapse with the bottom margin of its last in-flow child if height computes to auto.

However, according to CSS Sizing, that was "legacy spec prose" and should be interpreted as "behaves as auto".

Therefore, cyclic percentages and intrinsic keywords like min-content shouldn't prevent margin collapse, because they behave as auto.

This change aligns Servo with Gecko and Blink, but diverges from WebKit.

https://www.w3.org/TR/CSS22/box.html#collapsing-margins
https://www.w3.org/TR/css-sizing/#behave-auto

Testing: TBD

Reviewed in servo/servo#36278

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core

CI Results

Ran 0 Firefox configurations based on mozilla-central, and Firefox, and Chrome on GitHub CI

Total 5 tests

Status Summary

Firefox

PASS: 5

Chrome

PASS: 5

Links

GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1ee4a27f4f3f [wpt PR 51773] - layout: Allow collapsing bottom margins with any indefinite block size, a=testonly
Status: NEW → RESOLVED
Closed: 22 days ago
Resolution: --- → FIXED
Target Milestone: --- → 139 Branch
You need to log in before you can comment on or make changes to this bug.