Skip to content

Commit 207fe01

Browse files
committed
Account for top-margin when creating block subcontext
1 parent e66b66a commit 207fe01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compute/block.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ fn perform_final_layout_on_in_flow_children(
727727
let insets = [inset_left, inset_right];
728728

729729
// Compute child layout
730-
let mut child_block_ctx = block_ctx.sub_context(y_offset_for_absolute, insets);
730+
let mut child_block_ctx = block_ctx.sub_context(y_offset_for_absolute + item_non_auto_margin.top, insets);
731731
let output = tree.compute_block_child_layout(item.node_id, inputs, Some(&mut child_block_ctx));
732732

733733
// Extract float contribution from child block context

0 commit comments

Comments
 (0)