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

Side by Side Diff: LayoutTests/fast/css-grid-layout/absolutely-positioned-grid-children.html

Issue 637033003: [CSS Grid Layout] Fix positioned grid children position and size (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <link href="resources/grid.css" rel="stylesheet">
4 <style>
5
6 .grid {
7 grid-template-columns: 50px 100px 150px 200px;
8 grid-template-rows: 50px 100px 150px 200px;
9 width: 500px;
10 height: 500px;
11 border: 5px solid black;
12 margin: 30px;
13 padding: 15px;
14 /* Ensures that the grid container is the containing block of the absolutely positioned grid children. */
15 position: relative;
16 }
17
18 .absolute {
19 position: absolute;
20 }
21
22 .thirdRowThirdColumnSpanning2Rows {
23 grid-column: 3;
24 grid-row: 3 / span 2;
25 background-color: maroon;
26 }
27
28 .thirdRowThirdColumnSpanning2Rows2Columns {
29 grid-column: 3 / span 2;
30 grid-row: 3 / span 2;
31 background-color: aqua;
32 }
33
34 .endFirstRowEndFirstColumn {
35 background-color: blue;
36 grid-column-end: 2;
37 grid-row-end: 2;
38 }
39
40 .endFirstRowEndSecondColumn {
41 background-color: lime;
42 grid-column-end: 3;
43 grid-row-end: 2;
44 }
45
46 .endSecondRowEndFirstColumn {
47 background-color: purple;
48 grid-column-end: 2;
49 grid-row-end: 3;
50 }
51
52 .endThirdRowEndThirdColumnSpanning2Rows {
53 grid-column-end: 4;
54 grid-row: span 2 / 4;
55 background-color: maroon;
56 }
57
58 .endThirdRowEndThirdColumnSpanning2Rows2Columns {
59 grid-column: span 2 / 4;
60 grid-row: span 2 / 4;
61 background-color: aqua;
62 }
63
64 .onlyThirdRowOnlyThirdColumnSpanning2Rows {
65 grid-column: 3 / 4;
66 grid-row: 3 / 5;
67 background-color: maroon;
68 }
69
70 .onlyThirdRowOnlyThirdColumnSpanning2Rows2Columns {
71 grid-column: 3 / 5;
72 grid-row: 3 / 5;
73 background-color: aqua;
74 }
75
76 .offsetLeft25 {
77 left: 25px;
78 }
79
80 .offsetRight50 {
81 right: 50px;
82 }
83
84 .offsetTop75 {
85 top: 75px;
86 }
87
88 .offsetBottom100 {
89 bottom: 100px;
90 }
91
92 .offsetLeftMinus20 {
93 left: -20px;
94 }
95
96 .offsetRightMinus40 {
97 right: -40px;
98 }
99
100 .offsetTopMinus60 {
101 top: -60px;
102 }
103
104 .offsetBottomMinus80 {
105 bottom: -80px;
106 }
107
108 </style>
109 <script src="../../resources/check-layout.js"></script>
110 <body onload="checkLayout('.grid')">
111
112 <p>This test checks the behavior of the absolutely positioned grid children.</p>
113
114 <div class="grid">
115 <div class="sizedToGridArea absolute autoRowAutoColumn"
116 data-offset-x="15" data-offset-y="15" data-expected-width="530" data-exp ected-height="530">
117 </div>
118 <div class="sizedToGridArea absolute firstRowFirstColumn"
119 data-offset-x="15" data-offset-y="15" data-expected-width="515" data-exp ected-height="515">
120 </div>
121 <div class="sizedToGridArea absolute secondRowFirstColumn"
122 data-offset-x="15" data-offset-y="65" data-expected-width="515" data-exp ected-height="465">
123 </div>
124 <div class="sizedToGridArea absolute firstRowSecondColumn"
125 data-offset-x="65" data-offset-y="15" data-expected-width="465" data-exp ected-height="515">
126 </div>
127 <div class="sizedToGridArea absolute secondRowSecondColumn"
128 data-offset-x="65" data-offset-y="65" data-expected-width="465" data-exp ected-height="465">
129 </div>
130 <div class="sizedToGridArea absolute thirdRowThirdColumnSpanning2Rows"
131 data-offset-x="165" data-offset-y="165" data-expected-width="365" data-e xpected-height="350">
132 </div>
133 <div class="sizedToGridArea absolute thirdRowThirdColumnSpanning2Rows2Column s"
134 data-offset-x="165" data-offset-y="165" data-expected-width="350" data-e xpected-height="350">
135 </div>
136 </div>
137
138 <div class="grid">
139 <div class="sizedToGridArea absolute endThirdRowEndThirdColumnSpanning2Rows"
140 data-offset-x="15" data-offset-y="65" data-expected-width="315" data-exp ected-height="250">
141 </div>
142 <div class="sizedToGridArea absolute endThirdRowEndThirdColumnSpanning2Rows2 Columns"
143 data-offset-x="65" data-offset-y="65" data-expected-width="250" data-exp ected-height="250">
144 </div>
145 <div class="sizedToGridArea absolute endSecondRowEndSecondColumn"
146 data-offset-x="15" data-offset-y="15" data-expected-width="165" data-exp ected-height="165">
147 </div>
148 <div class="sizedToGridArea absolute endSecondRowEndFirstColumn"
149 data-offset-x="15" data-offset-y="15" data-expected-width="65" data-expe cted-height="165">
150 </div>
151 <div class="sizedToGridArea absolute endFirstRowEndSecondColumn"
152 data-offset-x="15" data-offset-y="15" data-expected-width="165" data-exp ected-height="65">
153 </div>
154 <div class="sizedToGridArea absolute endFirstRowEndFirstColumn"
155 data-offset-x="15" data-offset-y="15" data-expected-width="65" data-expe cted-height="65">
156 </div>
157 </div>
158
159 <div class="grid">
160 <div class="sizedToGridArea absolute onlyFirstRowOnlyFirstColumn"
161 data-offset-x="15" data-offset-y="15" data-expected-width="50" data-expe cted-height="50">
162 </div>
163 <div class="sizedToGridArea absolute onlySecondRowOnlyFirstColumn"
164 data-offset-x="15" data-offset-y="65" data-expected-width="50" data-expe cted-height="100">
165 </div>
166 <div class="sizedToGridArea absolute onlyFirstRowOnlySecondColumn"
167 data-offset-x="65" data-offset-y="15" data-expected-width="100" data-exp ected-height="50">
168 </div>
169 <div class="sizedToGridArea absolute onlySecondRowOnlySecondColumn"
170 data-offset-x="65" data-offset-y="65" data-expected-width="100" data-exp ected-height="100">
171 </div>
172 <div class="sizedToGridArea absolute onlyThirdRowOnlyThirdColumnSpanning2Row s2Columns"
173 data-offset-x="165" data-offset-y="165" data-expected-width="350" data-e xpected-height="350">
174 </div>
175 <div class="sizedToGridArea absolute onlyThirdRowOnlyThirdColumnSpanning2Row s"
176 data-offset-x="165" data-offset-y="165" data-expected-width="150" data-e xpected-height="350">
177 </div>
178 </div>
179
180 <div class="grid">
181 <div class="sizedToGridArea absolute autoRowAutoColumn offsetLeft25 offsetTo p75"
182 data-offset-x="25" data-offset-y="75" data-expected-width="530" data-exp ected-height="530">
183 </div>
184 <div class="sizedToGridArea absolute firstRowFirstColumn offsetRightMinus40 offsetBottomMinus80"
185 data-offset-x="55" data-offset-y="95" data-expected-width="515" data-exp ected-height="515">
186 </div>
187 <div class="sizedToGridArea absolute secondRowFirstColumn offsetRight50 offs etBottom100"
188 data-offset-x="-35" data-offset-y="-35" data-expected-width="515" data-e xpected-height="465">
189 </div>
190 <div class="sizedToGridArea absolute firstRowSecondColumn offsetLeftMinus20 offsetTopMinus60"
191 data-offset-x="45" data-offset-y="-45" data-expected-width="465" data-ex pected-height="515">
192 </div>
193 <div class="sizedToGridArea absolute secondRowSecondColumn offsetRight50 off setTop75"
194 data-offset-x="15" data-offset-y="140" data-expected-width="465" data-ex pected-height="465">
195 </div>
196 <div class="sizedToGridArea absolute thirdRowThirdColumnSpanning2Rows offset Left25 offsetBottom100"
197 data-offset-x="190" data-offset-y="65" data-expected-width="365" data-ex pected-height="350">
198 </div>
199 <div class="sizedToGridArea absolute thirdRowThirdColumnSpanning2Rows2Column s offsetLeftMinus20 offsetRight50 offsetTopMinus60 offsetBottom100"
200 data-offset-x="145" data-offset-y="105" data-expected-width="350" data-e xpected-height="350">
201 </div>
202 </div>
203
204 <div class="grid">
205 <div>
206 <div class="sizedToGridArea absolute autoRowAutoColumn offsetLeft25 offs etTop75"
207 data-offset-x="25" data-offset-y="75" data-expected-width="530" data -expected-height="530">
208 </div>
209 <div class="sizedToGridArea absolute firstRowFirstColumn offsetRightMinu s40 offsetBottomMinus80"
210 data-offset-x="55" data-offset-y="95" data-expected-width="515" data -expected-height="515">
211 </div>
212 <div class="sizedToGridArea absolute secondRowFirstColumn offsetRight50 offsetBottom100"
213 data-offset-x="-35" data-offset-y="-35" data-expected-width="515" da ta-expected-height="465">
214 </div>
215 <div class="sizedToGridArea absolute firstRowSecondColumn offsetLeftMinu s20 offsetTopMinus60"
216 data-offset-x="45" data-offset-y="-45" data-expected-width="465" dat a-expected-height="515">
217 </div>
218 <div class="sizedToGridArea absolute secondRowSecondColumn offsetRight50 offsetTop75"
219 data-offset-x="15" data-offset-y="140" data-expected-width="465" dat a-expected-height="465">
220 </div>
221 <div class="sizedToGridArea absolute thirdRowThirdColumnSpanning2Rows of fsetLeft25 offsetBottom100"
222 data-offset-x="190" data-offset-y="65" data-expected-width="365" dat a-expected-height="350">
223 </div>
224 <div class="sizedToGridArea absolute thirdRowThirdColumnSpanning2Rows2Co lumns offsetLeftMinus20 offsetRight50 offsetTopMinus60 offsetBottom100"
225 data-offset-x="145" data-offset-y="105" data-expected-width="350" da ta-expected-height="350">
226 </div>
227 </div>
228 </div>
229
230 </body>
231 </html>
OLDNEW
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/fast/css-grid-layout/absolutely-positioned-grid-children-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698