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

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

Issue 2734203003: Upstream first set of position:sticky tests to WPT (Closed)
Patch Set: Fix the indicators Created 3 years, 9 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>Reference for position:sticky elements should respect the top constraint< /title>
3
4 <style>
5 .group {
6 display: inline-block;
7 position: relative;
8 width: 150px;
9 height: 300px;
10 }
11
12 .scroller {
13 position: relative;
14 width: 100px;
15 height: 250px;
16 overflow: auto;
17 }
18
19 .contents {
20 height: 1000px;
21 }
22
23 .box {
24 width: 100px;
25 height: 100px;
26 }
27
28 .indicator {
29 background-color: green;
30 position: absolute;
31 left: 0;
32 }
33 </style>
34
35 <script>
36 window.addEventListener('load', function() {
37 for (const scroller of document.querySelectorAll('.scroller')) {
38 scroller.scrollTop = 250;
39 }
40 });
41 </script>
42
43 <div class="group">
44 <div class="scroller">
45 <div class="contents">
46 <div class="indicator box" style="top: 250px;"></div>
47 </div>
48 </div>
49 </div>
50
51 <div class="group">
52 <div class="scroller">
53 <div class="contents">
54 <div class="indicator box" style="top: 325px;"></div>
55 </div>
56 </div>
57 </div>
58
59 <div class="group">
60 <div class="scroller">
61 <div class="contents">
62 <div class="indicator box" style="top: 375px;"></div>
63 </div>
64 </div>
65 </div>
66
67 <div>You should see three green boxes above. No red should be visible.</div>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698