@@ -165,16 +165,23 @@ def create_column_box(children):
165
165
continue
166
166
column_skip_stack = resume_at
167
167
168
- # Get the empty space at the bottom of the column box
169
- empty_space = height - (
170
- new_box .children [- 1 ].position_y - box .content_box_y () +
171
- new_box .children [- 1 ].margin_height ())
172
-
173
- # Get the minimum size needed to render the next box
174
- next_box , _ , _ , _ , _ = block_box_layout (
175
- context , column_box , box .content_box_y (),
176
- column_skip_stack , containing_block , True , [], [], [])
177
- next_box_size = next_box .children [0 ].margin_height ()
168
+ in_flow_children = [
169
+ child for child in new_box .children
170
+ if child .is_in_normal_flow ()]
171
+
172
+ if in_flow_children :
173
+ # Get the empty space at the bottom of the column box
174
+ empty_space = height - (
175
+ in_flow_children [- 1 ].position_y - box .content_box_y () +
176
+ in_flow_children [- 1 ].margin_height ())
177
+
178
+ # Get the minimum size needed to render the next box
179
+ next_box , _ , _ , _ , _ = block_box_layout (
180
+ context , column_box , box .content_box_y (),
181
+ column_skip_stack , containing_block , True , [], [], [])
182
+ next_box_size = in_flow_children [0 ].margin_height ()
183
+ else :
184
+ empty_space = next_box_size = 0
178
185
179
186
# Append the size needed to render the next box in this
180
187
# column.
0 commit comments