mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:07:35 +00:00
LibWeb: Don't collapse boxes with CSS clear property set
I'm not sure if this is exactly correct, the link to CSS2 spec above says something that clearance cannot separate boxes, but I'm not sure if I understood it correctly or if I've done it in the right place. However, this change fixes our block-and-inline/clearfix.html test again (was regressed in previous commit).
This commit is contained in:
parent
142d498f14
commit
5b1aa2d55e
1 changed files with 4 additions and 0 deletions
|
@ -57,6 +57,10 @@ static bool margins_collapse_through(Box const& box, LayoutState& state)
|
|||
// FIXME: For the purpose of margin collapsing (CSS 2 §8.3.1 Collapsing margins), if the block axis is the
|
||||
// ratio-dependent axis, it is not considered to have a computed block-size of auto.
|
||||
// https://www.w3.org/TR/css-sizing-4/#aspect-ratio-margin-collapse
|
||||
|
||||
if (box.computed_values().clear() != CSS::Clear::None)
|
||||
return false;
|
||||
|
||||
return state.get(box).border_box_height() == 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue