mirror of
https://github.com/servo/servo.git
synced 2025-08-16 10:55:34 +01:00
layout: Allow collapsing bottom margins with any indefinite block size (#36278)
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: - `tests/wpt/tests/css/css-sizing/margin-collapse-with-indefinite-block-size-001.html` - `tests/wpt/tests/css/css-sizing/margin-collapse-with-indefinite-block-size-002.html` - `tests/wpt/tests/css/css-sizing/margin-collapse-with-indefinite-block-size-003.html` - `tests/wpt/tests/css/css-sizing/margin-collapse-with-indefinite-block-size-004.html` - `tests/wpt/tests/css/css-sizing/margin-collapse-with-indefinite-block-size-005.html` Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
3bc0eeab8f
commit
1f13e8b596
7 changed files with 181 additions and 1 deletions
65
tests/wpt/meta/MANIFEST.json
vendored
65
tests/wpt/meta/MANIFEST.json
vendored
|
@ -248765,6 +248765,71 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"margin-collapse-with-indefinite-block-size-001.html": [
|
||||
"47d2a0a043d32ba6220c1dd6a26859908a19bf6e",
|
||||
[
|
||||
null,
|
||||
[
|
||||
[
|
||||
"/css/reference/ref-filled-green-100px-square.xht",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"margin-collapse-with-indefinite-block-size-002.html": [
|
||||
"eb401c92b5e9475129f39be9980f47f42cb2bfa0",
|
||||
[
|
||||
null,
|
||||
[
|
||||
[
|
||||
"/css/reference/ref-filled-green-100px-square.xht",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"margin-collapse-with-indefinite-block-size-003.html": [
|
||||
"51f16f68e6998de4956a5f0615b49406fcacb02e",
|
||||
[
|
||||
null,
|
||||
[
|
||||
[
|
||||
"/css/reference/ref-filled-green-100px-square.xht",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"margin-collapse-with-indefinite-block-size-004.html": [
|
||||
"c393560d6c6ce799943db09468ba8e5cb0e90a5c",
|
||||
[
|
||||
null,
|
||||
[
|
||||
[
|
||||
"/css/reference/ref-filled-green-100px-square.xht",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"margin-collapse-with-indefinite-block-size-005.html": [
|
||||
"27814994aaac7ead76f67d051e8744323e8f4247",
|
||||
[
|
||||
null,
|
||||
[
|
||||
[
|
||||
"/css/reference/ref-filled-green-100px-square.xht",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"max-content-input-001.html": [
|
||||
"aabbea015748f9276718e2ba9728efc375c8910b",
|
||||
[
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue