Skip to content

Commit e6b2739

Browse files
committed
Account for padding/border for float-in-inline position
1 parent 1247281 commit e6b2739

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/blitz-dom/src/layout/inline.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,10 @@ impl BaseDocument {
215215
let output = self
216216
.compute_child_layout(NodeId::from(node_id), float_child_inputs);
217217
let min_y = state.line_y() as f32 / scale;
218-
let pos =
218+
let mut pos =
219219
block_ctx.place_floated_box(output.size, min_y, direction, clear);
220+
pos.x += container_pb.left;
221+
pos.y += container_pb.top;
220222

221223
let min_y = state.line_y() / scale as f64; //.max(pos.y as f64);
222224
let next_slot =

0 commit comments

Comments
 (0)