1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/reftests/position-sticky/right-2.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,54 @@ 1.4 +<!DOCTYPE html> 1.5 +<!-- Any copyright is dedicated to the Public Domain. 1.6 + - http://creativecommons.org/publicdomain/zero/1.0/ --> 1.7 +<html> 1.8 + <head> 1.9 + <title>CSS Test: Sticky Positioning - right, stuck</title> 1.10 + <link rel="author" title="Corey Ford" href="mailto:cford@mozilla.com"> 1.11 + <link rel="match" href="right-2-ref.html"> 1.12 + <meta name="flags" content="dom"> 1.13 + <meta name="assert" content="Sticky-right scrolled to the middle: should stick to the right edge of the scrolling container"> 1.14 + <style> 1.15 + #scroll { 1.16 + width: 100px; 1.17 + height: 100px; 1.18 + overflow: hidden; 1.19 + border: 1px solid black; 1.20 + white-space: nowrap; 1.21 + } 1.22 + #scroll div { 1.23 + display: inline-block; 1.24 + } 1.25 + .fill { 1.26 + width: 100px; 1.27 + height: 1px; 1.28 + } 1.29 + #contain { 1.30 + width: 200px; 1.31 + height: 10px; 1.32 + background-color: gray; 1.33 + /* This puts the sticky element's "normal position" at 1.34 + the right side of the containing block. */ 1.35 + direction: rtl; 1.36 + } 1.37 + #sticky { 1.38 + position: sticky; 1.39 + right: 10px; 1.40 + width: 10px; 1.41 + height: 10px; 1.42 + background-color: black; 1.43 + } 1.44 + </style> 1.45 + <body> 1.46 + <div id="scroll"> 1.47 + <div class="fill"></div 1.48 + ><div id="contain"> 1.49 + <div id="sticky"></div> 1.50 + </div 1.51 + ><div class="fill"></div> 1.52 + </div> 1.53 + <script type="text/javascript"> 1.54 + document.getElementById("scroll").scrollLeft = 200; 1.55 + </script> 1.56 + </body> 1.57 +</html>