diff --git a/weasyprint/layout/flex.py b/weasyprint/layout/flex.py index 3455c5026..7a54f9294 100644 --- a/weasyprint/layout/flex.py +++ b/weasyprint/layout/flex.py @@ -113,7 +113,8 @@ def flex_layout(context, box, bottom_space, skip_stack, containing_block, children = box.children for index, child in enumerate(children): # Absolute child layout: create placeholder. - if child.is_absolutely_positioned(): + if (child.is_absolutely_positioned() + and not isinstance(child, AbsolutePlaceholder)): child.position_x = box.content_box_x() child.position_y = box.content_box_y() new_child = placeholder = AbsolutePlaceholder(child)