mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
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> |
||
---|---|---|
.. | ||
display_list | ||
flexbox | ||
flow | ||
fragment_tree | ||
table | ||
taffy | ||
tests | ||
Cargo.toml | ||
cell.rs | ||
construct_modern.rs | ||
context.rs | ||
dom.rs | ||
dom_traversal.rs | ||
formatting_contexts.rs | ||
geom.rs | ||
layout_box_base.rs | ||
lib.rs | ||
lists.rs | ||
positioned.rs | ||
query.rs | ||
quotes.rs | ||
replaced.rs | ||
sizing.rs | ||
style_ext.rs | ||
traversal.rs |