summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-flexbox/abspos/dynamic-align-self-001.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/css/css-flexbox/abspos/dynamic-align-self-001.html')
-rw-r--r--testing/web-platform/tests/css/css-flexbox/abspos/dynamic-align-self-001.html46
1 files changed, 46 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-flexbox/abspos/dynamic-align-self-001.html b/testing/web-platform/tests/css/css-flexbox/abspos/dynamic-align-self-001.html
new file mode 100644
index 0000000000..208c006d2d
--- /dev/null
+++ b/testing/web-platform/tests/css/css-flexbox/abspos/dynamic-align-self-001.html
@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<link rel="author" title="David Grogan" href="mailto:dgrogan@chromium.org">
+<link rel="help" href="https://crbug.com/1306037">
+<link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
+<meta name="assert"
+ content="Abspos child of a flexbox moves after script changes its alignment.">
+<style>
+ #reference-overlapped-red {
+ position: absolute;
+ background-color: red;
+ width: 100px;
+ height: 100px;
+ z-index: -1;
+ }
+
+ #parent {
+ position: relative;
+ display: flex;
+ width: 200px;
+ height: 200px;
+ }
+
+ #child {
+ display: flex;
+ position: absolute;
+ width: 100px;
+ height: 100px;
+ background-color: green;
+ align-self: end;
+ }
+
+</style>
+
+<p>Test passes if there is a filled green square and <strong>no red</strong>.
+</p>
+
+<div id=reference-overlapped-red></div>
+
+<div id="parent">
+ <div id="child"></div>
+</div>
+
+<script>
+ document.body.offsetTop;
+ child.style.alignSelf = 'start';
+</script>