summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-view-transitions/snapshot-containing-block-absolute-ref.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/css/css-view-transitions/snapshot-containing-block-absolute-ref.html')
-rw-r--r--testing/web-platform/tests/css/css-view-transitions/snapshot-containing-block-absolute-ref.html51
1 files changed, 51 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-view-transitions/snapshot-containing-block-absolute-ref.html b/testing/web-platform/tests/css/css-view-transitions/snapshot-containing-block-absolute-ref.html
new file mode 100644
index 0000000000..3d307ce3c7
--- /dev/null
+++ b/testing/web-platform/tests/css/css-view-transitions/snapshot-containing-block-absolute-ref.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html>
+<title>View transitions: use snapshot containing block for absolute position (ref)</title>
+<link rel="help" href="https://github.com/WICG/view-transitions">
+<link rel="author" href="mailto:bokan@chromium.org">
+
+<style>
+:root {
+ background-color: red;
+}
+
+body {
+ height: 400vh;
+}
+
+#target {
+ position: absolute;
+ bottom: 0px;
+ right: 0px;
+ width: 100px;
+ height: 100px;
+
+ display: flex;
+ justify-content: center;
+ flex-direction: column;
+ align-items: center;
+
+ background: darkseagreen;
+}
+
+#view-transition {
+ position: absolute;
+ left: 20px;
+ top: 640px;
+ width: 700px;
+ height: 500px;
+ background-color: limegreen;
+}
+
+</style>
+
+<div id="view-transition">
+ <div id="target">TARGET</div>
+</div>
+
+<script>
+onload = () => {
+ const scrollTargetY = 600;
+ window.scrollTo(0, scrollTargetY);
+}
+</script>