about summary refs log tree commit diff stats
path: root/test
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2025-02-18 18:51:57 +0100
committerbptato <nincsnevem662@gmail.com>2025-02-18 19:26:40 +0100
commit4f785b483c92ef9755258e49de4a40a14ae4faf6 (patch)
tree96fc33c571455ef0822428188ab286167c9b8c3e /test
parentb823867d6d1a557cd38c06cc77116d3cde090a20 (diff)
downloadchawan-4f785b483c92ef9755258e49de4a40a14ae4faf6.tar.gz
layout: implement negative z-index
Ugly, but works.  I think.
Diffstat (limited to 'test')
-rw-r--r--test/layout/positioned-clip-box.expected3
-rw-r--r--test/layout/positioned-clip-box.html15
-rw-r--r--test/layout/stacking-contexts.color.expected28
-rw-r--r--test/layout/stacking-contexts.html18
4 files changed, 64 insertions, 0 deletions
diff --git a/test/layout/positioned-clip-box.expected b/test/layout/positioned-clip-box.expected
new file mode 100644
index 00000000..b84ffa49
--- /dev/null
+++ b/test/layout/positioned-clip-box.expected
@@ -0,0 +1,3 @@
+
+
+visible
diff --git a/test/layout/positioned-clip-box.html b/test/layout/positioned-clip-box.html
new file mode 100644
index 00000000..3fce0df4
--- /dev/null
+++ b/test/layout/positioned-clip-box.html
@@ -0,0 +1,15 @@
+<div style="overflow: hidden">
+<div style="position: absolute; top: 2em">
+visible
+</div>
+</div>
+<div style="overflow: hidden">
+<div style="position: relative; top: 3em">
+hidden
+</div>
+</div>
+<div style="position: relative; overflow: hidden">
+<div style="position: absolute; top: 3em">
+hidden
+</div>
+</div>
diff --git a/test/layout/stacking-contexts.color.expected b/test/layout/stacking-contexts.color.expected
new file mode 100644
index 00000000..19514bdd
--- /dev/null
+++ b/test/layout/stacking-contexts.color.expected
@@ -0,0 +1,28 @@
+
+
+            
+            
+                
+                
+                
+                
+            
+            
+
+            
+            
+                
+                
+                
+                
+            
+            
+
+            
+            
+                
+                
+                
+                
+            
+            
diff --git a/test/layout/stacking-contexts.html b/test/layout/stacking-contexts.html
new file mode 100644
index 00000000..6eb6e292
--- /dev/null
+++ b/test/layout/stacking-contexts.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<style>
+div { position: relative; width: 4em; height: 4em; top: 2em; left: 2em }
+</style>
+<div style="background: red">
+<div style="z-index: -1; background: green"></div>
+</div>
+<div style="background: blue"></div>
+<br>
+<div style="z-index: 0; background: red">
+<div style="z-index: 1; background: green"></div>
+</div>
+<div style="background: blue"></div>
+<br>
+<div style="background: red">
+<div style="z-index: 1; background: green"></div>
+</div>
+<div style="background: blue"></div>