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

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

Issue 2876853003: Upstream position: sticky <th> tests to WPT (Closed)
Patch Set: Add bottom/right tests Created 3 years, 7 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-table-th-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 bottom constraint should behave correctly for &lt;th&gt; elements</title>
3 <link rel="match" href="position-sticky-table-th-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 the position:sticky bottom co nstraint behaves correctly for &lt;th&gt; elements" />
6
7 <style>
8 table {
9 border-collapse:collapse;
10 }
11
12 td, th {
13 padding: 0;
14 }
15
16 td > div, th > div {
17 height: 50px;
18 width: 50px;
19 }
20
21 .group {
22 display: inline-block;
23 position: relative;
24 width: 150px;
25 height: 200px;
26 }
27
28 .scroller {
29 position: relative;
30 width: 100px;
31 height: 150px;
32 overflow-x: hidden;
33 overflow-y: auto;
34 }
35
36 .prepadding {
37 height: 100px;
38 }
39
40 .postpadding {
41 height: 250px;
42 }
43
44 .indicator {
45 position: absolute;
46 background-color: red;
47 left: 0;
48 height: 50px;
49 width: 50px;
50 }
51
52 .sticky {
53 position: sticky;
54 bottom: 25px;
55 background-color: green;
56 }
57 </style>
58
59 <script>
60 window.addEventListener('load', function() {
61 document.getElementById('scroller1').scrollTop = 0;
62 document.getElementById('scroller2').scrollTop = 75;
63 document.getElementById('scroller3').scrollTop = 200;
64 });
65 </script>
66
67 <div class="group">
68 <div id="scroller1" class="scroller">
69 <div class="indicator" style="top: 100px;"></div>
70 <div class="prepadding"></div>
71 <table>
72 <tbody>
73 <tr><td><div></div></td></tr>
74 <tr><td><div></div></td></tr>
75 <tr><td><div></div></td></tr>
76 </tbody>
77 <tfoot>
78 <tr>
79 <th class="sticky"><div></div></th>
80 </tr>
81 </tfoot>
82 </table>
83 <div class="postpadding"></div>
84 </div>
85 </div>
86
87 <div class="group">
88 <div id="scroller2" class="scroller">
89 <div class="indicator" style="top: 150px;"></div>
90 <div class="prepadding"></div>
91 <table>
92 <tbody>
93 <tr><td><div></div></td></tr>
94 <tr><td><div></div></td></tr>
95 <tr><td><div></div></td></tr>
96 </tbody>
97 <tfoot>
98 <tr>
99 <th class="sticky"><div></div></th>
100 </tr>
101 </tfoot>
102 </table>
103 <div class="postpadding"></div>
104 </div>
105 </div>
106
107 <div class="group">
108 <div id="scroller3" class="scroller">
109 <div class="indicator" style="top: 250px;"></div>
110 <div class="prepadding"></div>
111 <table>
112 <tbody>
113 <tr><td><div></div></td></tr>
114 <tr><td><div></div></td></tr>
115 <tr><td><div></div></td></tr>
116 </tbody>
117 <tfoot>
118 <tr>
119 <th class="sticky"><div></div></th>
120 </tr>
121 </tfoot>
122 </table>
123 <div class="postpadding"></div>
124 </div>
125 </div>
126
127 <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-table-th-bottom-ref.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698