about summary refs log tree commit diff stats
path: root/test
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-07-26 20:55:19 +0200
committerbptato <nincsnevem662@gmail.com>2024-07-26 20:55:19 +0200
commit1786358f347229bc2c7c4b7824629a43479707a4 (patch)
tree5d29efe8c28b7c77db2c73be76625cb9156befff /test
parent5f0afb49a0233f640040ef3ad0ce61677f330228 (diff)
downloadchawan-1786358f347229bc2c7c4b7824629a43479707a4.tar.gz
layout: position: relative, absolute fixes
* support position: absolute on flex items
* proper top/bottom/left/right calculation for position: relative
* push positioned flex box sizes to positioned stack

Still not perfect: position: absolute should always resolve percentage
sizes and top/bottom/left/right, meaning absolute layout needs to be
delayed until its containing box is fully layouted.
Diffstat (limited to 'test')
-rw-r--r--test/layout/flex-child-position-relative.expected3
-rw-r--r--test/layout/flex-child-position-relative.html8
2 files changed, 11 insertions, 0 deletions
diff --git a/test/layout/flex-child-position-relative.expected b/test/layout/flex-child-position-relative.expected
new file mode 100644
index 00000000..214c15da
--- /dev/null
+++ b/test/layout/flex-child-position-relative.expected
@@ -0,0 +1,3 @@
+    test 2
+
+test
diff --git a/test/layout/flex-child-position-relative.html b/test/layout/flex-child-position-relative.html
new file mode 100644
index 00000000..2bfafde6
--- /dev/null
+++ b/test/layout/flex-child-position-relative.html
@@ -0,0 +1,8 @@
+<div style="display: flex">
+<div style="position: relative; top: 2em">
+test
+</div>
+<div style="height: 5em">
+test 2
+</div>
+</div>