Skip to content

Commit

Permalink
Allow grid containers as root boxes
Browse files Browse the repository at this point in the history
  • Loading branch information
liZe committed Apr 5, 2024
1 parent 8931c24 commit 6f55bda
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion weasyprint/layout/page.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,8 @@ def make_page(context, root_box, page_type, resume_at, page_number,

# TODO: handle cases where the root element is something else.
# See https://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo
assert isinstance(root_box, (boxes.BlockBox, boxes.FlexContainerBox))
assert isinstance(root_box, (
boxes.BlockBox, boxes.FlexContainerBox, boxes.GridContainerBox))
context.create_block_formatting_context()
context.current_page = page_number
context.current_page_footnotes = []
Expand Down

0 comments on commit 6f55bda

Please sign in to comment.