aboutsummaryrefslogtreecommitdiffstats
path: root/test/layout/flex-item-margin-collapsing.html
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2025-01-02 18:24:40 +0100
committerbptato <nincsnevem662@gmail.com>2025-01-02 18:24:51 +0100
commit57d6a0d18d080b82b353a5451b5724807a5658b1 (patch)
treeee777cf2ffe31a9edc2b76399c4542a2217c6a07 /test/layout/flex-item-margin-collapsing.html
parent9ef9d6a0615aa4166f905fc7b6527b8b380739b0 (diff)
downloadchawan-57d6a0d18d080b82b353a5451b5724807a5658b1.tar.gz
layout: implement layoutFlexItem as layoutRootBlock
This way, it benefits from sub-layout caching. Which is great because our flex layout likes to unnecessarily redo item layout... Also, we now account for the bottom margin in flex items.
Diffstat (limited to 'test/layout/flex-item-margin-collapsing.html')
-rw-r--r--test/layout/flex-item-margin-collapsing.html28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/layout/flex-item-margin-collapsing.html b/test/layout/flex-item-margin-collapsing.html
new file mode 100644
index 00000000..56c7260d
--- /dev/null
+++ b/test/layout/flex-item-margin-collapsing.html
@@ -0,0 +1,28 @@
+<div style="display: flex; background: red; width: 5ch">
+<div style="margin-bottom: 2em; background: blue">
+<div style="margin-bottom: 1em; background: green">
+test
+</div>
+</div>
+</div>
+<div style="display: flex; background: red; width: 5ch">
+<div style="margin-bottom: 1em; background: blue">
+<div style="margin-bottom: 2em; background: green">
+test2
+</div>
+</div>
+</div>
+<div style="display: flex; flex-direction: column; background: red; width: 5ch">
+<div style="margin-bottom: 2em; background: blue">
+<div style="margin-bottom: 1em; background: green">
+test3
+</div>
+</div>
+</div>
+<div style="display: flex; flex-direction: column; background: red; width: 5ch">
+<div style="margin-bottom: 1em; background: blue">
+<div style="margin-bottom: 2em; background: green">
+test3
+</div>
+</div>
+</div>