Skip to content

Commit

Permalink
Clear adjoining margins when a container’s child doesn’t fit
Browse files Browse the repository at this point in the history
When a container is broken, we have to clear the adjoining margins to prevent
the top margins of the child to collapse with the bottom margin of the
container.
  • Loading branch information
liZe committed Apr 4, 2022
1 parent a5595e6 commit 4650b70
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions weasyprint/layout/block.py
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,7 @@ def block_container_layout(context, box, bottom_space, skip_stack,
context.unlayout_footnote(footnote)
return None, None, {'break': 'any', 'page': page}, [], False
elif stop:
adjoining_margins = []
break

else:
Expand Down

0 comments on commit 4650b70

Please sign in to comment.