Prevent margins from collapsing through when separated by clearance

This fixes #29884 and improves #29896.
This commit is contained in:
Oriol Brufau 2023-06-20 17:15:38 +02:00
parent 47fb54fc54
commit 00a5a4e6c4
15 changed files with 3 additions and 26 deletions

View file

@ -572,6 +572,7 @@ fn layout_in_flow_non_replaced_block_level(
collapsible_margins_in_children.collapsed_through &&
block_is_same_formatting_context &&
pbm.padding_border_sums.block == Length::zero() &&
clearance == Length::zero() &&
block_size.auto_is(|| Length::zero()) == Length::zero() &&
min_box_size.block == Length::zero();
},