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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/sticky/sticky-stacking-context.html

Issue 1850703002: Revert "Adapt and reland old position sticky implementation from https://codereview.chromium.org/34… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script> 2 <script>
3 if (window.internals) { 3 if (window.internals) {
4 internals.settings.setCSSStickyPositionEnabled(true); 4 internals.settings.setCSSStickyPositionEnabled(true);
5 } 5 }
6 </script> 6 </script>
7 7 <style type="text/css">
8 <html> 8 div {
9 <head> 9 height: 100px;
10 <style> 10 width: 100px;
11 body { 11 }
12 margin: 0; 12 .sticky {
13 } 13 background-color: green;
14 .container { 14 position: sticky;
15 width: 200px; 15 }
16 height: 400px; 16 .red {
17 outline: 2px solid black; 17 background-color: red;
18 } 18 margin-top: -100px;
19 19 }
20 .box {
21 width: 200px;
22 height: 200px;
23 }
24
25 .sticky {
26 position: sticky;
27 }
28
29 .intermediate {
30 position: absolute;
31 z-index: 1;
32 background-color: green
33 }
34
35 .child {
36 position: relative;
37 background-color: red;
38 z-index: 2;
39 }
40
41 .indicator {
42 position: absolute;
43 top: 0;
44 left: 0;
45 background-color: blue;
46 z-index: 0;
47 }
48 </style> 20 </style>
49 </head> 21 <!--
50 <body> 22 Tests that the sticky node will be popped out into a stacking context on top of the node which follows it. You should
51 <div class="indicator box"></div> 23 see no red boxes as the green sticky div should pop on top of the red div placed under it.
52 <div class="container"> 24 -->
53 <div class="intermediate box"></div> 25 <div class="sticky"></div>
54 <div class="sticky box"> 26 <div class="red"></div>
55 <div class="child box"></div>
56 </div>
57 </div>
58 </body>
59 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698