Skip to content

Commit

Permalink
Overflow-x blocking margin collapse fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoburns committed May 17, 2023
1 parent 77e82c4 commit 14a4879
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/compute/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,13 @@ fn compute_inner(
// Determine margin collapsing behaviour
let own_margins_collapse_with_children = Line {
start: vertical_margins_are_collapsible.start
&& !style.overflow.x.is_scroll_container()
&& !style.overflow.y.is_scroll_container()
&& style.position == Position::Relative
&& padding.top == 0.0
&& border.top == 0.0,
end: vertical_margins_are_collapsible.end
&& !style.overflow.x.is_scroll_container()
&& !style.overflow.y.is_scroll_container()
&& style.position == Position::Relative
&& padding.bottom == 0.0
Expand Down

0 comments on commit 14a4879

Please sign in to comment.