1
1
mirror of https://github.com/Kozea/WeasyPrint.git synced 2024-10-05 00:21:15 +03:00

Make columns create formatting contexts

Related to #659.
This commit is contained in:
Guillaume Ayoub 2018-08-01 18:17:46 +02:00
parent 553531d049
commit 035b9e479b

View File

@ -822,7 +822,15 @@ def establishes_formatting_context(box):
See http://www.w3.org/TR/CSS2/visuren.html#block-formatting
"""
return box.is_floated() or box.is_absolutely_positioned() or (
return (
box.is_floated()
) or (
box.is_absolutely_positioned()
) or (
# TODO: columns shouldn't be block boxes, this condition would then be
# useless when this is fixed
box.is_column
) or (
isinstance(box, boxes.BlockContainerBox) and
not isinstance(box, boxes.BlockBox)
) or (