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

Side by Side Diff: LayoutTests/fast/css/sticky/sticky-grid-expected.html

Issue 178453002: Add tests for sticky and various display values (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Simplify grid and flexbox tests Created 6 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
« no previous file with comments | « LayoutTests/fast/css/sticky/sticky-grid.html ('k') | no next file » | 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
3 <html>
4 <head>
5 <style>
6 body {
7 margin: 0;
8 width: 2000px;
9 overflow: hidden; /* hide scrollbars */
10 }
11
12 p {
13 position: relative;
14 left: 100px;
15 }
16
17 .group {
18 position: relative;
19 width: 500px;
20 height: 200px;
21 }
22
23 .grid-container {
24 display: grid;
25 grid-template-columns: 50% 50%;
26 grid-template-rows: 100%;
27 width: 200px;
28 height: 180px;
29 outline: 2px solid black;
30 }
31
32 .box {
33 width: 100px;
34 height: 180px;
35 }
36
37 .grid-item {
38 width: 100%;
39 height: 100%;
40 }
41
42 .sticky {
43 left: 100px;
44 background-color: green;
45 }
46 </style>
47 <script>
48 function doTest()
49 {
50 window.scrollTo(100, 0);
51 }
52 window.addEventListener('load', doTest, false);
53 </script>
54 </head>
55 <body>
56 <p>This test checks the behavior of position:sticky with grid items.
57 There should be no red.</p>
58
59 <div class="group" style="left: 100px">
60 <div class="grid-container" style="left: 100px">
61 <div class="sticky grid-item" style="grid-column: 2; grid-row: 1;"></d iv>
62 <div class="grid-item" style="grid-column: 1; grid-row: 1;"></div>
63 </div>
64 </div>
65
66 <div class="group" style="left: 150px">
67 <div class="grid-container" style="left: 100px; grid-template-columns: 2 5% 50% 25%">
68 <div class="sticky grid-item" style="grid-column: 2; grid-row: 1;"></d iv>
69 <div class="grid-item" style="grid-column: 3; grid-row: 1;"></div>
70 </div>
71 </div>
72
73 <div class="group" style="left: 200px">
74 <div class="grid-container" style="left: 100px">
75 <div class="sticky grid-item" style="grid-column: 1; grid-row: 1;"></d iv>
76 <div class="grid-item" style="grid-column: 2; grid-row: 1;"></div>
77 </div>
78 </div>
79
80 </body>
81 </html>
OLDNEW
« no previous file with comments | « LayoutTests/fast/css/sticky/sticky-grid.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698