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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/css/css-position-3/position-sticky-table-th-right.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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title>position:sticky right constraint should behave correctly for &lt;th&gt; e lements</title>
3 <link rel="match" href="position-sticky-table-th-right-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 right con straint behaves correctly for &lt;th&gt; elements" />
6
7 <style>
8 table {
9 border-collapse: collapse;
10 margin-left: 150px;
11 }
12
13 td, th {
14 padding: 0;
15 }
16
17 td > div, th > div {
18 height: 50px;
19 width: 50px;
20 }
21
22 .group {
23 position: relative;
24 width: 250px;
25 height: 150px;
26 }
27
28 .scroller {
29 position: relative;
30 width: 200px;
31 height: 100px;
32 overflow-x: auto;
33 overflow-y: hidden;
34 }
35
36 .postpadding {
37 height: 10px;
38 width: 500px;
39 }
40
41 .indicator {
42 position: absolute;
43 background-color: red;
44 top: 0;
45 height: 50px;
46 width: 50px;
47 }
48
49 .sticky {
50 position: sticky;
51 right: 25px;
52 background-color: green;
53 }
54 </style>
55
56 <script>
57 window.addEventListener('load', function() {
58 document.getElementById('scroller1').scrollLeft = 0;
59 document.getElementById('scroller2').scrollLeft = 75;
60 document.getElementById('scroller3').scrollLeft = 200;
61 });
62 </script>
63
64 <div class="group">
65 <div id="scroller1" class="scroller">
66 <div class="indicator" style="left: 150px;"></div>
67 <table>
68 <tbody>
69 <tr>
70 <td><div></div></td>
71 <td><div></div></td>
72 <td><div></div></td>
73 <th class="sticky"><div></div></th>
74 </tr>
75 </tbody>
76 </table>
77 <div class="postpadding"></div>
78 </div>
79 </div>
80
81 <div class="group">
82 <div id="scroller2" class="scroller">
83 <div class="indicator" style="left: 200px;"></div>
84 <table>
85 <tbody>
86 <tr>
87 <td><div></div></td>
88 <td><div></div></td>
89 <td><div></div></td>
90 <th class="sticky"><div></div></th>
91 </tr>
92 </tbody>
93 </table>
94 <div class="postpadding"></div>
95 </div>
96 </div>
97
98 <div class="group">
99 <div id="scroller3" class="scroller">
100 <div class="indicator" style="left: 300px;"></div>
101 <table>
102 <tbody>
103 <tr>
104 <td><div></div></td>
105 <td><div></div></td>
106 <td><div></div></td>
107 <th class="sticky"><div></div></th>
108 </tr>
109 </tbody>
110 </table>
111 <div class="postpadding"></div>
112 </div>
113 </div>
114
115 <div>You should see three green boxes above. No red should be visible.</div>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698