Skip to content

Commit

Permalink
fix: use main size of flex container to grow/shrink (fixes: Kozea#2222)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhdaines committed Aug 17, 2024
1 parent 87611fb commit 0aea88f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions weasyprint/layout/flex.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,10 @@ def flex_layout(context, box, bottom_space, skip_stack, containing_block,
# Step 6 (9.3.6 Resolve the flexible lengths of all the flex items
# to find their used main size.) See
# https://www.w3.org/TR/css-flexbox-1/#resolve-flexible-lengths
# FIXME: verify if this is really the *inner* main size (box model?)
available_main_space = getattr(box, axis)
LOGGER.debug("%r 9.7.1 inner main size %s %r", box, axis,
available_main_space)
for line in flex_lines:
# Step 6 - 9.7.1 Determine the used flex factor. Sum the outer
# hypothetical main sizes of all items on the line. If the sum
Expand Down

0 comments on commit 0aea88f

Please sign in to comment.