1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/reftests/position-sticky/padding-1.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,37 @@ 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 - percentage offsets</title> 1.10 + <link rel="author" title="Corey Ford" href="mailto:cford@mozilla.com"> 1.11 + <link rel="match" href="padding-1-ref.html"> 1.12 + <meta name="assert" content="Percentage offsets should be resolved against the content box of the scrolling container"> 1.13 + <style> 1.14 + body { 1.15 + /* Make sure it works on the first pass of reflow */ 1.16 + overflow: scroll; 1.17 + } 1.18 + #scroll { 1.19 + width: 130px; 1.20 + height: 80px; 1.21 + overflow: scroll; 1.22 + border: 10px solid black; 1.23 + padding: 10px; 1.24 + } 1.25 + #sticky { 1.26 + position: sticky; 1.27 + top: 50%; 1.28 + left: 50%; 1.29 + width: 10px; 1.30 + height: 10px; 1.31 + background-color: black; 1.32 + } 1.33 + </style> 1.34 + <body> 1.35 + <div id="scroll"> 1.36 + <div id="sticky"> 1.37 + </div> 1.38 + </div> 1.39 + </body> 1.40 +</html>