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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-item-auto-margins-alignment-vertical-lr.html

Issue 1488493003: [css-grid] refactoring of layout tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 <html> 2 <html>
3 <head> 3 <head>
4 <link href="../css-intrinsic-dimensions/resources/width-keyword-classes.css" rel ="stylesheet">
4 <link href="resources/grid.css" rel="stylesheet"> 5 <link href="resources/grid.css" rel="stylesheet">
5 <script src="../../resources/check-layout.js"></script> 6 <script src="../../resources/check-layout.js"></script>
6 <style> 7 <style>
7 body { 8 body {
8 margin: 0; 9 margin: 0;
9 } 10 }
10 11
11 .grid { 12 .grid {
12 grid-template-columns: 100px 100px; 13 grid-template-columns: 100px 100px;
13 grid-template-rows: 200px 200px; 14 grid-template-rows: 200px 200px;
14 width: -webkit-fit-content;
15 margin-bottom: 20px; 15 margin-bottom: 20px;
16 } 16 }
17 17
18 .item { 18 .item {
19 width: 20px; 19 width: 20px;
20 height: 40px; 20 height: 40px;
21 } 21 }
22 22
23 .autoMarginTop { margin-top: auto; } 23 .autoMarginTop { margin-top: auto; }
24 .autoMarginRight { margin-right: auto; } 24 .autoMarginRight { margin-right: auto; }
25 .autoMarginBottom { margin-bottom: auto; } 25 .autoMarginBottom { margin-bottom: auto; }
26 .autoMarginLeft { margin-left: auto; } 26 .autoMarginLeft { margin-left: auto; }
27 .autoMargin { margin: auto; } 27 .autoMargin { margin: auto; }
28 28
29 .itemsCenter { 29 .itemsCenter {
30 align-items: center; 30 align-items: center;
31 justify-items: center; 31 justify-items: center;
32 } 32 }
33 </style> 33 </style>
34 </head> 34 </head>
35 <body onload="checkLayout('.grid')"> 35 <body onload="checkLayout('.grid')">
36 36
37 <p>This test checks on a vertical-lr grid that aling-self and justify-self prope rties are not applied when there is auto-margin in the correponding axis. Instea d, auto-margin alignment should be applied.</p> 37 <p>This test checks on a vertical-lr grid that aling-self and justify-self prope rties are not applied when there is auto-margin in the correponding axis. Instea d, auto-margin alignment should be applied.</p>
38 38
39 <p>Direction: LTR | Self Alignment: center | fixed size items | 1 auto-margin</p > 39 <p>Direction: LTR | Self Alignment: center | fixed size items | 1 auto-margin</p >
40 <div style="position: relative"> 40 <div style="position: relative">
41 <div class="grid verticalLR itemsCenter"> 41 <div class="grid fit-content verticalLR itemsCenter">
42 <div class="item autoMarginTop firstRowFirstColumn" data-offset-x="90" d ata-offset-y="60" data-expected-width="20" data-expected-height="40"></div> 42 <div class="item autoMarginTop firstRowFirstColumn" data-offset-x="90" d ata-offset-y="60" data-expected-width="20" data-expected-height="40"></div>
43 <div class="item autoMarginRight firstRowSecondColumn" data-offset-x="0" data-offset-y="130" data-expected-width="20" data-expected-height="40"></div> 43 <div class="item autoMarginRight firstRowSecondColumn" data-offset-x="0" data-offset-y="130" data-expected-width="20" data-expected-height="40"></div>
44 <div class="item autoMarginLeft secondRowFirstColumn" data-offset-x="380 " data-offset-y="30" data-expected-width="20" data-expected-height="40"></div> 44 <div class="item autoMarginLeft secondRowFirstColumn" data-offset-x="380 " data-offset-y="30" data-expected-width="20" data-expected-height="40"></div>
45 <div class="item autoMarginBottom secondRowSecondColumn" data-offset-x=" 290" data-offset-y="100" data-expected-width="20" data-expected-height="40"></di v> 45 <div class="item autoMarginBottom secondRowSecondColumn" data-offset-x=" 290" data-offset-y="100" data-expected-width="20" data-expected-height="40"></di v>
46 </div> 46 </div>
47 </div> 47 </div>
48 48
49 <p>Direction: LTR | Self Alignment: stretch | fixed size items | 4 auto-margin</ p> 49 <p>Direction: LTR | Self Alignment: stretch | fixed size items | 4 auto-margin</ p>
50 <div style="position: relative"> 50 <div style="position: relative">
51 <div class="grid verticalLR"> 51 <div class="grid fit-content verticalLR">
52 <div class="item autoMargin firstRowFirstColumn" data-offset-x="90" data -offset-y="30" data-expected-width="20" data-expected-height="40"></div> 52 <div class="item autoMargin firstRowFirstColumn" data-offset-x="90" data -offset-y="30" data-expected-width="20" data-expected-height="40"></div>
53 <div class="item autoMargin firstRowSecondColumn" data-offset-x="90" dat a-offset-y="130" data-expected-width="20" data-expected-height="40"></div> 53 <div class="item autoMargin firstRowSecondColumn" data-offset-x="90" dat a-offset-y="130" data-expected-width="20" data-expected-height="40"></div>
54 <div class="item autoMargin secondRowFirstColumn" data-offset-x="290" da ta-offset-y="30" data-expected-width="20" data-expected-height="40"></div> 54 <div class="item autoMargin secondRowFirstColumn" data-offset-x="290" da ta-offset-y="30" data-expected-width="20" data-expected-height="40"></div>
55 <div class="item autoMargin secondRowSecondColumn" data-offset-x="290" d ata-offset-y="130" data-expected-width="20" data-expected-height="40"></div> 55 <div class="item autoMargin secondRowSecondColumn" data-offset-x="290" d ata-offset-y="130" data-expected-width="20" data-expected-height="40"></div>
56 </div> 56 </div>
57 </div> 57 </div>
58 58
59 <p>Direction: LTR | Self Alignment: center | auto size items | 1 auto-margin</p> 59 <p>Direction: LTR | Self Alignment: center | auto size items | 1 auto-margin</p>
60 <div style="position: relative"> 60 <div style="position: relative">
61 <div class="grid verticalLR itemsCenter"> 61 <div class="grid fit-content verticalLR itemsCenter">
62 <div class="autoMarginTop firstRowFirstColumn" data-offset-x="90" data-o ffset-y="60" data-expected-width="20" data-expected-height="40"><div class="item "></div></div> 62 <div class="autoMarginTop firstRowFirstColumn" data-offset-x="90" data-o ffset-y="60" data-expected-width="20" data-expected-height="40"><div class="item "></div></div>
63 <div class="autoMarginRight firstRowSecondColumn" data-offset-x="0" data -offset-y="130" data-expected-width="20" data-expected-height="40"><div class="i tem"></div></div> 63 <div class="autoMarginRight firstRowSecondColumn" data-offset-x="0" data -offset-y="130" data-expected-width="20" data-expected-height="40"><div class="i tem"></div></div>
64 <div class="autoMarginLeft secondRowFirstColumn" data-offset-x="380" dat a-offset-y="30" data-expected-width="20" data-expected-height="40"><div class="i tem"></div></div> 64 <div class="autoMarginLeft secondRowFirstColumn" data-offset-x="380" dat a-offset-y="30" data-expected-width="20" data-expected-height="40"><div class="i tem"></div></div>
65 <div class="autoMarginBottom secondRowSecondColumn" data-offset-x="290" data-offset-y="100" data-expected-width="20" data-expected-height="40"><div clas s="item"></div></div> 65 <div class="autoMarginBottom secondRowSecondColumn" data-offset-x="290" data-offset-y="100" data-expected-width="20" data-expected-height="40"><div clas s="item"></div></div>
66 </div> 66 </div>
67 </div> 67 </div>
68 68
69 <p>Direction: LTR | Self Alignment: stretch | auto size items | 4 auto-margin</p > 69 <p>Direction: LTR | Self Alignment: stretch | auto size items | 4 auto-margin</p >
70 <div style="position: relative"> 70 <div style="position: relative">
71 <div class="grid verticalLR"> 71 <div class="grid fit-content verticalLR">
72 <div class="autoMargin firstRowFirstColumn" data-offset-x="90" data-offs et-y="30" data-expected-width="20" data-expected-height="40"><div class="item">< /div></div> 72 <div class="autoMargin firstRowFirstColumn" data-offset-x="90" data-offs et-y="30" data-expected-width="20" data-expected-height="40"><div class="item">< /div></div>
73 <div class="autoMargin firstRowSecondColumn" data-offset-x="90" data-off set-y="130" data-expected-width="20" data-expected-height="40"><div class="item" ></div></div> 73 <div class="autoMargin firstRowSecondColumn" data-offset-x="90" data-off set-y="130" data-expected-width="20" data-expected-height="40"><div class="item" ></div></div>
74 <div class="autoMargin secondRowFirstColumn" data-offset-x="290" data-of fset-y="30" data-expected-width="20" data-expected-height="40"><div class="item" ></div></div> 74 <div class="autoMargin secondRowFirstColumn" data-offset-x="290" data-of fset-y="30" data-expected-width="20" data-expected-height="40"><div class="item" ></div></div>
75 <div class="autoMargin secondRowSecondColumn" data-offset-x="290" data-o ffset-y="130" data-expected-width="20" data-expected-height="40"><div class="ite m"></div></div> 75 <div class="autoMargin secondRowSecondColumn" data-offset-x="290" data-o ffset-y="130" data-expected-width="20" data-expected-height="40"><div class="ite m"></div></div>
76 </div> 76 </div>
77 </div> 77 </div>
78 78
79 <!-- direction RTL --> 79 <!-- direction RTL -->
80 <p>Direction: RTL | Self Alignment: center | fixed size items | 1 auto-margin</p > 80 <p>Direction: RTL | Self Alignment: center | fixed size items | 1 auto-margin</p >
81 <div style="position: relative"> 81 <div style="position: relative">
82 <div class="grid verticalLR itemsCenter directionRTL"> 82 <div class="grid fit-content verticalLR itemsCenter directionRTL">
83 <div class="item autoMarginTop firstRowFirstColumn" data-offset-x="90" d ata-offset-y="160" data-expected-width="20" data-expected-height="40"></div> 83 <div class="item autoMarginTop firstRowFirstColumn" data-offset-x="90" d ata-offset-y="160" data-expected-width="20" data-expected-height="40"></div>
84 <div class="item autoMarginRight firstRowSecondColumn" data-offset-x="0" data-offset-y="30" data-expected-width="20" data-expected-height="40"></div> 84 <div class="item autoMarginRight firstRowSecondColumn" data-offset-x="0" data-offset-y="30" data-expected-width="20" data-expected-height="40"></div>
85 <div class="item autoMarginLeft secondRowFirstColumn" data-offset-x="380 " data-offset-y="130" data-expected-width="20" data-expected-height="40"></div> 85 <div class="item autoMarginLeft secondRowFirstColumn" data-offset-x="380 " data-offset-y="130" data-expected-width="20" data-expected-height="40"></div>
86 <div class="item autoMarginBottom secondRowSecondColumn" data-offset-x=" 290" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div> 86 <div class="item autoMarginBottom secondRowSecondColumn" data-offset-x=" 290" data-offset-y="0" data-expected-width="20" data-expected-height="40"></div>
87 </div> 87 </div>
88 </div> 88 </div>
89 89
90 90
91 <p>Direction: RTL | Self Alignment: stretch | fixed size items | 4 auto-margin</ p> 91 <p>Direction: RTL | Self Alignment: stretch | fixed size items | 4 auto-margin</ p>
92 <div style="position: relative"> 92 <div style="position: relative">
93 <div class="grid verticalLR directionRTL"> 93 <div class="grid fit-content verticalLR directionRTL">
94 <div class="item autoMargin firstRowFirstColumn" data-offset-x="90" data -offset-y="130" data-expected-width="20" data-expected-height="40"></div> 94 <div class="item autoMargin firstRowFirstColumn" data-offset-x="90" data -offset-y="130" data-expected-width="20" data-expected-height="40"></div>
95 <div class="item autoMargin firstRowSecondColumn" data-offset-x="90" dat a-offset-y="30" data-expected-width="20" data-expected-height="40"></div> 95 <div class="item autoMargin firstRowSecondColumn" data-offset-x="90" dat a-offset-y="30" data-expected-width="20" data-expected-height="40"></div>
96 <div class="item autoMargin secondRowFirstColumn" data-offset-x="290" da ta-offset-y="130" data-expected-width="20" data-expected-height="40"></div> 96 <div class="item autoMargin secondRowFirstColumn" data-offset-x="290" da ta-offset-y="130" data-expected-width="20" data-expected-height="40"></div>
97 <div class="item autoMargin secondRowSecondColumn" data-offset-x="290" d ata-offset-y="30" data-expected-width="20" data-expected-height="40"></div> 97 <div class="item autoMargin secondRowSecondColumn" data-offset-x="290" d ata-offset-y="30" data-expected-width="20" data-expected-height="40"></div>
98 </div> 98 </div>
99 </div> 99 </div>
100 100
101 <p>Direction: RTL | Self Alignment: center | auto size items | 1 auto-margin</p> 101 <p>Direction: RTL | Self Alignment: center | auto size items | 1 auto-margin</p>
102 <div style="position: relative"> 102 <div style="position: relative">
103 <div class="grid verticalLR itemsCenter directionRTL"> 103 <div class="grid fit-content verticalLR itemsCenter directionRTL">
104 <div class="autoMarginTop firstRowFirstColumn" data-offset-x="90" data-o ffset-y="160" data-expected-width="20" data-expected-height="40"><div class="ite m"></div></div> 104 <div class="autoMarginTop firstRowFirstColumn" data-offset-x="90" data-o ffset-y="160" data-expected-width="20" data-expected-height="40"><div class="ite m"></div></div>
105 <div class="autoMarginRight firstRowSecondColumn" data-offset-x="0" data -offset-y="30" data-expected-width="20" data-expected-height="40"><div class="it em"></div></div> 105 <div class="autoMarginRight firstRowSecondColumn" data-offset-x="0" data -offset-y="30" data-expected-width="20" data-expected-height="40"><div class="it em"></div></div>
106 <div class="autoMarginLeft secondRowFirstColumn" data-offset-x="380" dat a-offset-y="130" data-expected-width="20" data-expected-height="40"><div class=" item"></div></div> 106 <div class="autoMarginLeft secondRowFirstColumn" data-offset-x="380" dat a-offset-y="130" data-expected-width="20" data-expected-height="40"><div class=" item"></div></div>
107 <div class="autoMarginBottom secondRowSecondColumn" data-offset-x="290" data-offset-y="0" data-expected-width="20" data-expected-height="40"><div class= "item"></div></div> 107 <div class="autoMarginBottom secondRowSecondColumn" data-offset-x="290" data-offset-y="0" data-expected-width="20" data-expected-height="40"><div class= "item"></div></div>
108 </div> 108 </div>
109 </div> 109 </div>
110 110
111 111
112 <p>Direction: RTL | Self Alignment: stretch | auto size items | 4 auto-margin</p > 112 <p>Direction: RTL | Self Alignment: stretch | auto size items | 4 auto-margin</p >
113 <div style="position: relative"> 113 <div style="position: relative">
114 <div class="grid verticalLR directionRTL"> 114 <div class="grid fit-content verticalLR directionRTL">
115 <div class="autoMargin firstRowFirstColumn" data-offset-x="90" data-offs et-y="130" data-expected-width="20" data-expected-height="40"><div class="item"> </div></div> 115 <div class="autoMargin firstRowFirstColumn" data-offset-x="90" data-offs et-y="130" data-expected-width="20" data-expected-height="40"><div class="item"> </div></div>
116 <div class="autoMargin firstRowSecondColumn" data-offset-x="90" data-off set-y="30" data-expected-width="20" data-expected-height="40"><div class="item"> </div></div> 116 <div class="autoMargin firstRowSecondColumn" data-offset-x="90" data-off set-y="30" data-expected-width="20" data-expected-height="40"><div class="item"> </div></div>
117 <div class="autoMargin secondRowFirstColumn" data-offset-x="290" data-of fset-y="130" data-expected-width="20" data-expected-height="40"><div class="item "></div></div> 117 <div class="autoMargin secondRowFirstColumn" data-offset-x="290" data-of fset-y="130" data-expected-width="20" data-expected-height="40"><div class="item "></div></div>
118 <div class="autoMargin secondRowSecondColumn" data-offset-x="290" data-o ffset-y="30" data-expected-width="20" data-expected-height="40"><div class="item "></div></div> 118 <div class="autoMargin secondRowSecondColumn" data-offset-x="290" data-o ffset-y="30" data-expected-width="20" data-expected-height="40"><div class="item "></div></div>
119 </div> 119 </div>
120 </div> 120 </div>
121 121
122 </body> 122 </body>
123 </html> 123 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698