layout/reftests/position-sticky/left-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 - left, stuck</title>
     7     <link rel="author" title="Corey Ford" href="mailto:cford@mozilla.com">
     8     <link rel="match" href="left-2-ref.html">
     9     <meta name="flags" content="dom">
    10     <meta name="assert" content="Sticky-left with scrolling: should stick to the left edge of the scrolling container">
    11     <style>
    12       #scroll {
    13         width: 100px;
    14         height: 100px;
    15         overflow: hidden;
    16         border: 1px solid black;
    17         white-space: nowrap;
    18       }
    19       #scroll div {
    20         display: inline-block;
    21       }
    22       .fill {
    23         width: 100px;
    24         height: 1px;
    25       }
    26       #contain {
    27         width: 200px;
    28         height: 10px;
    29         background-color: gray;
    30       }
    31       #sticky {
    32         position: sticky;
    33         left: 10px;
    34         width: 10px;
    35         height: 10px;
    36         background-color: black;
    37       }
    38     </style>
    39   <body>
    40     <div id="scroll">
    41       <div class="fill"></div
    42       ><div id="contain">
    43         <div id="sticky"></div>
    44       </div
    45       ><div class="fill"></div>
    46     </div>
    47     <script type="text/javascript">
    48       document.getElementById("scroll").scrollLeft = 100;
    49     </script>
    50   </body>
    51 </html>

mercurial