We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cf7bff7 commit 87d9e84Copy full SHA for 87d9e84
weasyprint/layout/columns.py
@@ -183,7 +183,12 @@ def create_column_box(children):
183
# example when the next box can't be separated from its own
184
# next box. In this case we don't try to find the real value
185
# and let the workaround below fix this for us.
186
- if next_box_size - empty_space > 0:
+ #
187
+ # We also want to avoid very small values that may have been
188
+ # introduced by rounding errors. As the workaround below at
189
+ # least adds 1 pixel for each loop, we can ignore lost spaces
190
+ # lower than 1px.
191
+ if next_box_size - empty_space > 1:
192
lost_space = min(lost_space, next_box_size - empty_space)
193
194
# Stop if we already rendered the whole content
0 commit comments