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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css-grid-layout/justify-self-cell.html

Issue 1488493003: [css-grid] refactoring of layout tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Patch rebased and refactoring of alignment css rules. Created 4 years, 11 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 <html> 2 <html>
3 <link href="../css-intrinsic-dimensions/resources/width-keyword-classes.css" rel ="stylesheet">
3 <link href="resources/grid.css" rel="stylesheet"> 4 <link href="resources/grid.css" rel="stylesheet">
5 <link href="resources/grid-alignment.css" rel="stylesheet">
4 <style> 6 <style>
5 .grid { 7 .grid {
6 grid-template-columns: 100px 100px; 8 grid-template-columns: 100px 100px;
7 grid-template-rows: 200px 200px; 9 grid-template-rows: 200px 200px;
8 width: -webkit-fit-content;
9 } 10 }
10 11
11 .cell { 12 .cell {
12 width: 10px; 13 width: 10px;
13 height: 20px; 14 height: 20px;
14 } 15 }
15
16 .justifySelfAuto {
17 justify-self: auto;
18 }
19
20 .justifySelfStretch {
21 justify-self: stretch;
22 }
23
24 .justifySelfStart {
25 justify-self: start;
26 }
27
28 .justifySelfEnd {
29 justify-self: end;
30 }
31
32 .justifySelfCenter {
33 justify-self: center;
34 }
35
36 .justifySelfRight {
37 justify-self: right;
38 }
39
40 .justifySelfLeft {
41 justify-self: left;
42 }
43
44 .justifySelfFlexStart {
45 justify-self: flex-start;
46 }
47
48 .justifySelfFlexEnd {
49 justify-self: flex-end;
50 }
51
52 .justifySelfSelfStart {
53 justify-self: self-start;
54 }
55
56 .justifySelfSelfEnd {
57 justify-self: self-end;
58 }
59
60 .justifyItemsCenter {
61 justify-items: center;
62 }
63 </style> 16 </style>
64 <script src="../../resources/check-layout.js"></script> 17 <script src="../../resources/check-layout.js"></script>
65 <body onload="checkLayout('.grid')"> 18 <body onload="checkLayout('.grid')">
66 19
67 <p>This test checks that the justify-self property is applied correctly.</p> 20 <p>This test checks that the justify-self property is applied correctly.</p>
68 21
69 <div style="position: relative" class="constrainedContainer"> 22 <div style="position: relative" class="constrainedContainer">
70 <div class="grid" data-expected-width="200" data-expected-height="400"> 23 <div class="grid fit-content" data-expected-width="200" data-expected-height="40 0">
71 <div class="justifySelfStretch firstRowFirstColumn" data-offset-x="0" data-o ffset-y="0" data-expected-width="100" data-expected-height="200"></div> 24 <div class="justifySelfStretch firstRowFirstColumn" data-offset-x="0" data-o ffset-y="0" data-expected-width="100" data-expected-height="200"></div>
72 <div class="cell justifySelfStart firstRowSecondColumn" data-offset-x="100" data-offset-y="0" data-expected-width="10" data-expected-height="20"></div> 25 <div class="cell justifySelfStart firstRowSecondColumn" data-offset-x="100" data-offset-y="0" data-expected-width="10" data-expected-height="20"></div>
73 <div class="cell justifySelfEnd firstRowSecondColumn" data-offset-x="190" da ta-offset-y="0" data-expected-width="10" data-expected-height="20"></div> 26 <div class="cell justifySelfEnd firstRowSecondColumn" data-offset-x="190" da ta-offset-y="0" data-expected-width="10" data-expected-height="20"></div>
74 <div class="cell justifySelfCenter secondRowFirstColumn" data-offset-x="45" data-offset-y="200" data-expected-width="10" data-expected-height="20"></div> 27 <div class="cell justifySelfCenter secondRowFirstColumn" data-offset-x="45" data-offset-y="200" data-expected-width="10" data-expected-height="20"></div>
75 <div class="cell justifySelfRight secondRowSecondColumn" data-offset-x="190" data-offset-y="200" data-expected-width="10" data-expected-height="20"></div> 28 <div class="cell justifySelfRight secondRowSecondColumn" data-offset-x="190" data-offset-y="200" data-expected-width="10" data-expected-height="20"></div>
76 <div class="cell justifySelfLeft secondRowSecondColumn" data-offset-x="100" data-offset-y="200" data-expected-width="10" data-expected-height="20"></div> 29 <div class="cell justifySelfLeft secondRowSecondColumn" data-offset-x="100" data-offset-y="200" data-expected-width="10" data-expected-height="20"></div>
77 </div> 30 </div>
78 31
79 <div style="position: relative" class="constrainedContainer"> 32 <div style="position: relative" class="constrainedContainer">
80 <div class="grid" data-expected-width="200" data-expected-height="400"> 33 <div class="grid fit-content" data-expected-width="200" data-expected-height="40 0">
81 <div class="cell justifySelfFlexEnd firstRowFirstColumn" data-offset-x="90" data-offset-y="0" data-expected-width="10" data-expected-height="20"></div> 34 <div class="cell justifySelfFlexEnd firstRowFirstColumn" data-offset-x="90" data-offset-y="0" data-expected-width="10" data-expected-height="20"></div>
82 <div class="cell justifySelfFlexStart firstRowSecondColumn" data-offset-x="1 00" data-offset-y="0" data-expected-width="10" data-expected-height="20"></div> 35 <div class="cell justifySelfFlexStart firstRowSecondColumn" data-offset-x="1 00" data-offset-y="0" data-expected-width="10" data-expected-height="20"></div>
83 <div class="cell justifySelfSelfStart secondRowFirstColumn" data-offset-x="0 " data-offset-y="200" data-expected-width="10" data-expected-height="20"></div> 36 <div class="cell justifySelfSelfStart secondRowFirstColumn" data-offset-x="0 " data-offset-y="200" data-expected-width="10" data-expected-height="20"></div>
84 <div class="cell justifySelfSelfEnd secondRowSecondColumn" data-offset-x="19 0" data-offset-y="200" data-expected-width="10" data-expected-height="20"></div> 37 <div class="cell justifySelfSelfEnd secondRowSecondColumn" data-offset-x="19 0" data-offset-y="200" data-expected-width="10" data-expected-height="20"></div>
85 </div> 38 </div>
86 </div> 39 </div>
87 40
88 <!-- Default justification and initial values. --> 41 <!-- Default justification and initial values. -->
89 <div style="position: relative"> 42 <div style="position: relative">
90 <div class="grid justifyItemsCenter" data-expected-width="200" data-expected -height="400"> 43 <div class="grid fit-content justifyItemsCenter" data-expected-width="200" d ata-expected-height="400">
91 <div class="cell justifySelfAuto firstRowFirstColumn" data-offset-x="45" data-offset-y="0" data-expected-width="10" data-expected-height="20"></div> 44 <div class="cell justifySelfAuto firstRowFirstColumn" data-offset-x="45" data-offset-y="0" data-expected-width="10" data-expected-height="20"></div>
92 <div class="cell firstRowSecondColumn" data-offset-x="145" data-offset-y ="0" data-expected-width="10" data-expected-height="20"></div> 45 <div class="cell firstRowSecondColumn" data-offset-x="145" data-offset-y ="0" data-expected-width="10" data-expected-height="20"></div>
93 <div class="cell justifySelfSelfStart secondRowFirstColumn" data-offset- x="0" data-offset-y="200" data-expected-width="10" data-expected-height="20"></d iv> 46 <div class="cell justifySelfSelfStart secondRowFirstColumn" data-offset- x="0" data-offset-y="200" data-expected-width="10" data-expected-height="20"></d iv>
94 <div class="cell justifySelfSelfEnd secondRowSecondColumn" data-offset-x ="190" data-offset-y="200" data-expected-width="10" data-expected-height="20"></ div> 47 <div class="cell justifySelfSelfEnd secondRowSecondColumn" data-offset-x ="190" data-offset-y="200" data-expected-width="10" data-expected-height="20"></ div>
95 </div> 48 </div>
96 </div> 49 </div>
97 50
98 <div style="position: relative"> 51 <div style="position: relative">
99 <div class="grid" data-expected-width="200" data-expected-height="400"> 52 <div class="grid fit-content" data-expected-width="200" data-expected-height ="400">
100 <div class="justifySelfAuto firstRowFirstColumn" data-offset-x="0" data- offset-y="0" data-expected-width="100" data-expected-height="200"></div> 53 <div class="justifySelfAuto firstRowFirstColumn" data-offset-x="0" data- offset-y="0" data-expected-width="100" data-expected-height="200"></div>
101 <div class="cell firstRowSecondColumn" data-offset-x="100" data-offset-y ="0" data-expected-width="10" data-expected-height="20"></div> 54 <div class="cell firstRowSecondColumn" data-offset-x="100" data-offset-y ="0" data-expected-width="10" data-expected-height="20"></div>
102 <div class="cell justifySelfStart secondRowFirstColumn" data-offset-x="0 " data-offset-y="200" data-expected-width="10" data-expected-height="20"></div> 55 <div class="cell justifySelfStart secondRowFirstColumn" data-offset-x="0 " data-offset-y="200" data-expected-width="10" data-expected-height="20"></div>
103 <div class="cell justifySelfEnd secondRowSecondColumn" data-offset-x="19 0" data-offset-y="200" data-expected-width="10" data-expected-height="20"></div> 56 <div class="cell justifySelfEnd secondRowSecondColumn" data-offset-x="19 0" data-offset-y="200" data-expected-width="10" data-expected-height="20"></div>
104 </div> 57 </div>
105 </div> 58 </div>
106 59
107 <!-- Vertical writing mode. --> 60 <!-- Vertical writing mode. -->
108 <div style="position: relative" class="constrainedContainer"> 61 <div style="position: relative" class="constrainedContainer">
109 <div class="grid verticalRL" data-expected-width="400" data-expected-height="200 "> 62 <div class="grid fit-content verticalRL" data-expected-width="400" data-expected -height="200">
110 <div class="justifySelfStretch firstRowFirstColumn" data-offset-x="200" data -offset-y="0" data-expected-width="200" data-expected-height="100"></div> 63 <div class="justifySelfStretch firstRowFirstColumn" data-offset-x="200" data -offset-y="0" data-expected-width="200" data-expected-height="100"></div>
111 <div class="cell justifySelfStart firstRowSecondColumn" data-offset-x="390" data-offset-y="100" data-expected-width="10" data-expected-height="20"></div> 64 <div class="cell justifySelfStart firstRowSecondColumn" data-offset-x="390" data-offset-y="100" data-expected-width="10" data-expected-height="20"></div>
112 <div class="cell justifySelfEnd firstRowSecondColumn" data-offset-x="390" da ta-offset-y="180" data-expected-width="10" data-expected-height="20"></div> 65 <div class="cell justifySelfEnd firstRowSecondColumn" data-offset-x="390" da ta-offset-y="180" data-expected-width="10" data-expected-height="20"></div>
113 <div class="cell justifySelfCenter secondRowFirstColumn" data-offset-x="190" data-offset-y="40" data-expected-width="10" data-expected-height="20"></div> 66 <div class="cell justifySelfCenter secondRowFirstColumn" data-offset-x="190" data-offset-y="40" data-expected-width="10" data-expected-height="20"></div>
114 <div class="cell justifySelfRight secondRowSecondColumn" data-offset-x="190" data-offset-y="180" data-expected-width="10" data-expected-height="20"></div> 67 <div class="cell justifySelfRight secondRowSecondColumn" data-offset-x="190" data-offset-y="180" data-expected-width="10" data-expected-height="20"></div>
115 <div class="cell justifySelfLeft secondRowSecondColumn" data-offset-x="190" data-offset-y="100" data-expected-width="10" data-expected-height="20"></div> 68 <div class="cell justifySelfLeft secondRowSecondColumn" data-offset-x="190" data-offset-y="100" data-expected-width="10" data-expected-height="20"></div>
116 </div> 69 </div>
117 70
118 <div style="position: relative" class="constrainedContainer"> 71 <div style="position: relative" class="constrainedContainer">
119 <div class="grid verticalLR" data-expected-width="400" data-expected-height="200 "> 72 <div class="grid fit-content verticalLR" data-expected-width="400" data-expected -height="200">
120 <div class="cell justifySelfFlexEnd firstRowFirstColumn" data-offset-x="0" d ata-offset-y="80" data-expected-width="10" data-expected-height="20"></div> 73 <div class="cell justifySelfFlexEnd firstRowFirstColumn" data-offset-x="0" d ata-offset-y="80" data-expected-width="10" data-expected-height="20"></div>
121 <div class="cell justifySelfFlexStart firstRowSecondColumn" data-offset-x="0 " data-offset-y="100" data-expected-width="10" data-expected-height="20"></div> 74 <div class="cell justifySelfFlexStart firstRowSecondColumn" data-offset-x="0 " data-offset-y="100" data-expected-width="10" data-expected-height="20"></div>
122 <div class="cell justifySelfSelfStart secondRowFirstColumn" data-offset-x="2 00" data-offset-y="0" data-expected-width="10" data-expected-height="20"></div> 75 <div class="cell justifySelfSelfStart secondRowFirstColumn" data-offset-x="2 00" data-offset-y="0" data-expected-width="10" data-expected-height="20"></div>
123 <div class="cell justifySelfSelfEnd secondRowSecondColumn" data-offset-x="20 0" data-offset-y="180" data-expected-width="10" data-expected-height="20"></div> 76 <div class="cell justifySelfSelfEnd secondRowSecondColumn" data-offset-x="20 0" data-offset-y="180" data-expected-width="10" data-expected-height="20"></div>
124 </div> 77 </div>
125 </div> 78 </div>
126 79
127 <!-- RTL direction. --> 80 <!-- RTL direction. -->
128 <div style="position: relative" class="constrainedContainer"> 81 <div style="position: relative" class="constrainedContainer">
129 <div class="grid directionRTL" data-expected-width="200" data-expected-height="4 00"> 82 <div class="grid fit-content directionRTL" data-expected-width="200" data-expect ed-height="400">
130 <div class="justifySelfStretch firstRowFirstColumn" data-offset-x="100" data -offset-y="0" data-expected-width="100" data-expected-height="200"></div> 83 <div class="justifySelfStretch firstRowFirstColumn" data-offset-x="100" data -offset-y="0" data-expected-width="100" data-expected-height="200"></div>
131 <div class="cell justifySelfStart firstRowSecondColumn" data-offset-x="90" d ata-offset-y="0" data-expected-width="10" data-expected-height="20"></div> 84 <div class="cell justifySelfStart firstRowSecondColumn" data-offset-x="90" d ata-offset-y="0" data-expected-width="10" data-expected-height="20"></div>
132 <div class="cell justifySelfEnd firstRowSecondColumn" data-offset-x="0" data -offset-y="0" data-expected-width="10" data-expected-height="20"></div> 85 <div class="cell justifySelfEnd firstRowSecondColumn" data-offset-x="0" data -offset-y="0" data-expected-width="10" data-expected-height="20"></div>
133 <div class="cell justifySelfCenter secondRowFirstColumn" data-offset-x="145" data-offset-y="200" data-expected-width="10" data-expected-height="20"></div> 86 <div class="cell justifySelfCenter secondRowFirstColumn" data-offset-x="145" data-offset-y="200" data-expected-width="10" data-expected-height="20"></div>
134 <div class="cell justifySelfRight secondRowSecondColumn" data-offset-x="90" data-offset-y="200" data-expected-width="10" data-expected-height="20"></div> 87 <div class="cell justifySelfRight secondRowSecondColumn" data-offset-x="90" data-offset-y="200" data-expected-width="10" data-expected-height="20"></div>
135 <div class="cell justifySelfLeft secondRowSecondColumn" data-offset-x="0" da ta-offset-y="200" data-expected-width="10" data-expected-height="20"></div> 88 <div class="cell justifySelfLeft secondRowSecondColumn" data-offset-x="0" da ta-offset-y="200" data-expected-width="10" data-expected-height="20"></div>
136 </div> 89 </div>
137 90
138 <div style="position: relative" class="constrainedContainer"> 91 <div style="position: relative" class="constrainedContainer">
139 <div class="grid directionRTL" data-expected-width="200" data-expected-height="4 00"> 92 <div class="grid fit-content directionRTL" data-expected-width="200" data-expect ed-height="400">
140 <div class="cell justifySelfFlexEnd firstRowFirstColumn" data-offset-x="100" data-offset-y="0" data-expected-width="10" data-expected-height="20"></div> 93 <div class="cell justifySelfFlexEnd firstRowFirstColumn" data-offset-x="100" data-offset-y="0" data-expected-width="10" data-expected-height="20"></div>
141 <div class="cell justifySelfFlexStart firstRowSecondColumn" data-offset-x="9 0" data-offset-y="0" data-expected-width="10" data-expected-height="20"></div> 94 <div class="cell justifySelfFlexStart firstRowSecondColumn" data-offset-x="9 0" data-offset-y="0" data-expected-width="10" data-expected-height="20"></div>
142 <div class="cell justifySelfSelfStart secondRowFirstColumn" data-offset-x="1 90" data-offset-y="200" data-expected-width="10" data-expected-height="20"></div > 95 <div class="cell justifySelfSelfStart secondRowFirstColumn" data-offset-x="1 90" data-offset-y="200" data-expected-width="10" data-expected-height="20"></div >
143 <div class="cell justifySelfSelfEnd secondRowSecondColumn" data-offset-x="0" data-offset-y="200" data-expected-width="10" data-expected-height="20"></div> 96 <div class="cell justifySelfSelfEnd secondRowSecondColumn" data-offset-x="0" data-offset-y="200" data-expected-width="10" data-expected-height="20"></div>
144 </div> 97 </div>
145 </div> 98 </div>
146 99
147 <!-- RTL direction with opposite directions grid container vs grid item. --> 100 <!-- RTL direction with opposite directions grid container vs grid item. -->
148 <div style="position: relative" class="constrainedContainer"> 101 <div style="position: relative" class="constrainedContainer">
149 <div class="grid" data-expected-width="200" data-expected-height="400"> 102 <div class="grid fit-content" data-expected-width="200" data-expected-height="40 0">
150 <div class="justifySelfStretch firstRowFirstColumn directionRTL" data-offset -x="0" data-offset-y="0" data-expected-width="100" data-expected-height="200"></ div> 103 <div class="justifySelfStretch firstRowFirstColumn directionRTL" data-offset -x="0" data-offset-y="0" data-expected-width="100" data-expected-height="200"></ div>
151 <div class="cell justifySelfStart firstRowSecondColumn directionRTL" data-of fset-x="100" data-offset-y="0" data-expected-width="10" data-expected-height="20 "></div> 104 <div class="cell justifySelfStart firstRowSecondColumn directionRTL" data-of fset-x="100" data-offset-y="0" data-expected-width="10" data-expected-height="20 "></div>
152 <div class="cell justifySelfEnd firstRowSecondColumn directionRTL" data-offs et-x="190" data-offset-y="0" data-expected-width="10" data-expected-height="20"> </div> 105 <div class="cell justifySelfEnd firstRowSecondColumn directionRTL" data-offs et-x="190" data-offset-y="0" data-expected-width="10" data-expected-height="20"> </div>
153 <div class="cell justifySelfCenter secondRowFirstColumn directionRTL" data-o ffset-x="45" data-offset-y="200" data-expected-width="10" data-expected-height=" 20"></div> 106 <div class="cell justifySelfCenter secondRowFirstColumn directionRTL" data-o ffset-x="45" data-offset-y="200" data-expected-width="10" data-expected-height=" 20"></div>
154 <div class="cell justifySelfRight secondRowSecondColumn directionRTL" data-o ffset-x="190" data-offset-y="200" data-expected-width="10" data-expected-height= "20"></div> 107 <div class="cell justifySelfRight secondRowSecondColumn directionRTL" data-o ffset-x="190" data-offset-y="200" data-expected-width="10" data-expected-height= "20"></div>
155 <div class="cell justifySelfLeft secondRowSecondColumn directionRTL" data-of fset-x="100" data-offset-y="200" data-expected-width="10" data-expected-height=" 20"></div> 108 <div class="cell justifySelfLeft secondRowSecondColumn directionRTL" data-of fset-x="100" data-offset-y="200" data-expected-width="10" data-expected-height=" 20"></div>
156 </div> 109 </div>
157 110
158 <div style="position: relative" class="constrainedContainer"> 111 <div style="position: relative" class="constrainedContainer">
159 <div class="grid" data-expected-width="200" data-expected-height="400"> 112 <div class="grid fit-content" data-expected-width="200" data-expected-height="40 0">
160 <div class="cell justifySelfFlexEnd firstRowFirstColumn directionRTL" data-o ffset-x="90" data-offset-y="0" data-expected-width="10" data-expected-height="20 "></div> 113 <div class="cell justifySelfFlexEnd firstRowFirstColumn directionRTL" data-o ffset-x="90" data-offset-y="0" data-expected-width="10" data-expected-height="20 "></div>
161 <div class="cell justifySelfFlexStart firstRowSecondColumn directionRTL" dat a-offset-x="100" data-offset-y="0" data-expected-width="10" data-expected-height ="20"></div> 114 <div class="cell justifySelfFlexStart firstRowSecondColumn directionRTL" dat a-offset-x="100" data-offset-y="0" data-expected-width="10" data-expected-height ="20"></div>
162 <div class="cell justifySelfSelfStart secondRowFirstColumn directionRTL" dat a-offset-x="90" data-offset-y="200" data-expected-width="10" data-expected-heigh t="20"></div> 115 <div class="cell justifySelfSelfStart secondRowFirstColumn directionRTL" dat a-offset-x="90" data-offset-y="200" data-expected-width="10" data-expected-heigh t="20"></div>
163 <div class="cell justifySelfSelfEnd secondRowSecondColumn directionRTL" data -offset-x="100" data-offset-y="200" data-expected-width="10" data-expected-heigh t="20"></div> 116 <div class="cell justifySelfSelfEnd secondRowSecondColumn directionRTL" data -offset-x="100" data-offset-y="200" data-expected-width="10" data-expected-heigh t="20"></div>
164 </div> 117 </div>
165 </div> 118 </div>
166 119
167 </body> 120 </body>
168 </html> 121 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698