summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-position/sticky/position-sticky-right-002.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
commit6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch)
treea68f146d7fa01f0134297619fbe7e33db084e0aa /testing/web-platform/tests/css/css-position/sticky/position-sticky-right-002.html
parentInitial commit. (diff)
downloadthunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz
thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-position/sticky/position-sticky-right-002.html')
-rw-r--r--testing/web-platform/tests/css/css-position/sticky/position-sticky-right-002.html96
1 files changed, 96 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-position/sticky/position-sticky-right-002.html b/testing/web-platform/tests/css/css-position/sticky/position-sticky-right-002.html
new file mode 100644
index 0000000000..e83189a498
--- /dev/null
+++ b/testing/web-platform/tests/css/css-position/sticky/position-sticky-right-002.html
@@ -0,0 +1,96 @@
+<!DOCTYPE html>
+
+ <meta charset="UTF-8">
+
+ <title>CSS Position Test: sticky element with right offset specified with px unit</title>
+
+ <link rel="author" title="GĂ©rard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
+ <link rel="help" href="https://www.w3.org/TR/css-position-3/#sticky-pos">
+ <link rel="match" href="reference/position-sticky-right-002-ref.html">
+
+ <meta name="flags" content="">
+
+ <style>
+ div.scrolling-container
+ {
+ background-image: url("support/100x100-red.png");
+ background-repeat: no-repeat;
+ height: 150px;
+ margin-bottom: 30px;
+ overflow-y: hidden;
+ position: static;
+ white-space: nowrap;
+ width: 250px;
+ }
+
+ div#first-scrolling-container
+ {
+ background-position: 75px top;
+ }
+
+ div#second-scrolling-container
+ {
+ background-position: 50px top;
+ }
+
+ div#third-scrolling-container
+ {
+ background-position: left top;
+ }
+
+ div.horizontal-spacer
+ {
+ display: inline-block;
+ height: 100%;
+ width: 100px;
+ }
+
+ div.content
+ {
+ display: inline-block;
+ height: 100%;
+ width: 300px;
+ }
+
+ div.sticky
+ {
+ background-color: green;
+ display: inline-block;
+ height: 100px;
+ position: sticky;
+ right: 100px;
+ vertical-align: top;
+ width: 100px;
+ }
+ </style>
+
+ <body onload="document.getElementById(&quot;first-scrolling-container&quot;).scrollLeft = 25; document.getElementById(&quot;second-scrolling-container&quot;).scrollLeft = 100; document.getElementById(&quot;third-scrolling-container&quot;).scrollLeft = 200;">
+
+ <p>Test passes if there are 3 filled green squares and <strong>no red</strong>.
+
+ <!--
+ first-scrolling-container: before reaching the sticking point
+ -->
+
+ <div id="first-scrolling-container" class="scrolling-container">
+
+ <div class="horizontal-spacer"></div><div class="content"><div class="horizontal-spacer"></div><div id="first-sticky" class="sticky"></div><div class="horizontal-spacer"></div></div><div class="horizontal-spacer"></div>
+
+ </div>
+
+ <!--
+ second-scrolling-container: when reaching the sticking point and beyond
+ -->
+
+ <div id="second-scrolling-container" class="scrolling-container">
+
+ <div class="horizontal-spacer"></div><div class="content"><div class="horizontal-spacer"></div><div id="second-sticky" class="sticky"></div><div class="horizontal-spacer"></div></div><div class="horizontal-spacer"></div>
+
+ </div>
+
+
+ <div id="third-scrolling-container" class="scrolling-container">
+
+ <div class="horizontal-spacer"></div><div class="content"><div class="horizontal-spacer"></div><div id="third-sticky" class="sticky"></div><div class="horizontal-spacer"></div></div><div class="horizontal-spacer"></div>
+
+ </div>