gioser

tawasuyu/taffy

A high performance rust-powered UI layout library

HTML 5364Rust 86Markdown 12TOML 91841 Definitions

Improve interaction of abspos children of block containers with margin collapsing (#760)

Signed-off-by: Nico Burns <nico@nicoburns.com>

c86f9223e8262ae2d25cdca10fa569c15881dcd2 · by Nico Burns · (1 year ago) · parent b765cb51a · browse the tree at this commit

Semantic delta · 1

src/compute/block.rs

1 files · +1 −1

diff --git a/src/compute/block.rs b/src/compute/block.rs
index db1eb8bdd..be1c4f16d 100644
--- a/src/compute/block.rs
+++ b/src/compute/block.rs
@@ -551,8 +551,8 @@ fn perform_final_layout_on_in_flow_children(
                 y_offset_for_absolute = committed_y_offset + item_layout.size.height + y_margin_offset;
             } else {
                 committed_y_offset += item_layout.size.height + y_margin_offset;
-                y_offset_for_absolute = committed_y_offset;
                 active_collapsible_margin_set = bottom_margin_set;
+                y_offset_for_absolute = committed_y_offset + active_collapsible_margin_set.resolve();
             }
         }
     }