layout/reftests/position-sticky/top-bottom-2.html

Fri, 16 Jan 2015 18:13:44 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 18:13:44 +0100
branch
TOR_BUG_9701
changeset 14
925c144e1f1f
permissions
-rw-r--r--

Integrate suggestion from review to improve consistency with existing code.

     1 <!DOCTYPE html>
     2 <!-- Any copyright is dedicated to the Public Domain.
     3    - http://creativecommons.org/publicdomain/zero/1.0/ -->
     4 <html>
     5   <head>
     6     <title>CSS Test: Sticky Positioning - top+bottom, at middle</title>
     7     <link rel="author" title="Corey Ford" href="mailto:cford@mozilla.com">
     8     <link rel="match" href="top-bottom-2-ref.html">
     9     <meta name="flags" content="dom">
    10     <meta name="assert" content="Top+bottom sticky, scrolled to the middle: should stay in its normal position">
    11     <style>
    12       #scroll {
    13         height: 100px;
    14         overflow: hidden;
    15       }
    16       #sticky {
    17         position: sticky;
    18         top: 10px;
    19         bottom: 10px;
    20         height: 10px;
    21         background-color: black;
    22       }
    23     </style>
    24   </head>
    25   <body>
    26     <div id="scroll">
    27       <div style="height: 100px"></div>
    28       <div id="sticky"></div>
    29       <div style="height: 100px"></div>
    30     </div>
    31     <script type="application/javascript">
    32       document.getElementById("scroll").scrollTop = 50;
    33     </script>
    34   </body>
    35 </html>

mercurial