Status: FAIL | Duration: 16ms | Subtests: 0/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi
/css/css-position/sticky/position-sticky-left-003.html
<!DOCTYPE html> <meta charset="UTF-8"> <title>CSS Position Test: sticky element with left offset specified with percentage 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-left-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: right top; } div#second-scrolling-container { background-position: 100px top; } div#third-scrolling-container { background-position: 50px 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; left: 40%; position: sticky; vertical-align: top; width: 100px; } </style> <body onload="document.getElementById("first-scrolling-container").scrollLeft = 50; document.getElementById("second-scrolling-container").scrollLeft = 150; document.getElementById("third-scrolling-container").scrollLeft = 300;"> <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>
/css/css-position/sticky/reference/position-sticky-left-002-ref.html
<!DOCTYPE html> <meta charset="UTF-8"> <title>CSS Reftest Reference</title> <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> <style> div.scrolling-container { height: 150px; margin-bottom: 30px; overflow-y: hidden; position: static; white-space: nowrap; width: 250px; } div.horizontal-spacer-200 { display: inline-block; height: 100%; width: 200px; } div.sticky { background-color: green; display: inline-block; height: 100px; position: relative; vertical-align: top; width: 100px; } div#first-sticky { left: 0px; } div#second-sticky { left: 50px; } div#third-sticky { left: 100px; } </style> <body onload="document.getElementById("first-scrolling-container").scrollLeft = 50; document.getElementById("second-scrolling-container").scrollLeft = 150; document.getElementById("third-scrolling-container").scrollLeft = 300;"> <p>Test passes if there are 3 filled green squares and <strong>no red</strong>. <div id="first-scrolling-container" class="scrolling-container"> <div class="horizontal-spacer-200"></div><div id="first-sticky" class="sticky"></div><div class="horizontal-spacer-200"></div> </div> <div id="second-scrolling-container" class="scrolling-container"> <div class="horizontal-spacer-200"></div><div id="second-sticky" class="sticky"></div><div class="horizontal-spacer-200"></div> </div> <div id="third-scrolling-container" class="scrolling-container"> <div class="horizontal-spacer-200"></div><div id="third-sticky" class="sticky"></div><div class="horizontal-spacer-200"></div> </div>