Fri, 16 Jan 2015 18:13:44 +0100
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 - initial reflow</title>
7 <link rel="author" title="Corey Ford" href="mailto:cford@mozilla.com">
8 <link rel="match" href="initial-1-ref.html">
9 <meta name="assert" content="Sticky positioning should be calculated correctly on initial page reflow">
10 <style>
11 body {
12 height: 100px;
13 margin: 0;
14 /* Without this, we do multiple passes of reflow, and
15 * the sticky element ends up positioned correctly.
16 */
17 overflow-y: scroll;
18 }
19 #sticky {
20 position: sticky;
21 top: 10px;
22 height: 10px;
23 margin-bottom: 10px;
24 background-color: black;
25 }
26 </style>
27 <body>
28 <div id="sticky"></div>
29 </body>
30 </html>