Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/css/css-position-3/position-sticky-bottom.html

Issue 2734203003: Upstream first set of position:sticky tests to WPT (Closed)
Patch Set: Make all tests in a suite the same html with different scroll position Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/external/wpt/css/css-position-3/position-sticky-bottom-ref.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title>position:sticky elements should respect the bottom constraint</title>
3 <link rel="match" href="position-sticky-bottom-ref.html" />
4 <link rel="help" href="https://www.w3.org/TR/css-position-3/#sticky-pos" />
5 <meta name="assert" content="This test checks that position:sticky elements obey their bottom anchor after scrolling" />
6
7 <style>
8 .group {
9 display: inline-block;
10 position: relative;
11 width: 150px;
12 height: 250px;
13 }
14
15 .scroller {
16 position: relative;
17 width: 100px;
18 height: 200px;
19 overflow-x: hidden;
20 overflow-y: auto;
21 }
22
23 .contents {
24 height: 500px;
25 }
26
27 .prepadding {
28 height: 200px;
29 }
30
31 .container {
32 height: 200px;
33 }
34
35 .filler {
36 height: 100px;
37 }
38
39 .indicator {
40 background-color: red;
41 position: absolute;
42 left: 0;
43 }
44
45 .sticky {
46 background-color: green;
47 position: sticky;
48 bottom: 25px;
49 }
50
51 .box {
52 width: 100%;
53 height: 100px;
54 }
55 </style>
56
57 <script>
58 window.addEventListener('load', function() {
59 document.getElementById('scroller1').scrollTop = 100;
60 document.getElementById('scroller2').scrollTop = 175;
61 document.getElementById('scroller3').scrollTop = 250;
62 });
63 </script>
64
65 <div class="group">
66 <div id="scroller1" class="scroller">
67 <div class="indicator box" style="top: 200px;"></div>
68 <div class="contents">
69 <div class="prepadding"></div>
70 <div class="container">
71 <div class="filler"></div>
72 <div class="sticky box"></div>
73 </div>
74 </div>
75 </div>
76 </div>
77
78 <div class="group">
79 <div id="scroller2" class="scroller">
80 <div class="indicator box" style="top: 250px;"></div>
81 <div class="contents">
82 <div class="prepadding"></div>
83 <div class="container">
84 <div class="filler"></div>
85 <div class="sticky box"></div>
86 </div>
87 </div>
88 </div>
89 </div>
90
91 <div class="group">
92 <div id="scroller3" class="scroller">
93 <div class="indicator box" style="top: 300px;"></div>
94 <div class="contents">
95 <div class="prepadding"></div>
96 <div class="container">
97 <div class="filler"></div>
98 <div class="sticky box"></div>
99 </div>
100 </div>
101 </div>
102 </div>
103
104 <div>You should see three green boxes above. No red should be visible.</div>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/external/wpt/css/css-position-3/position-sticky-bottom-ref.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698