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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-positioned-items-padding.html

Issue 2080643002: [css-grid] Implement repeat(auto-fit) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Patch for landing v3 Created 4 years, 5 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 <link href="resources/grid.css" rel="stylesheet"> 2 <link href="resources/grid.css" rel="stylesheet">
3 <style> 3 <style>
4 4
5 .grid { 5 .grid {
6 grid-template-columns: 100px 200px; 6 grid-template-columns: 100px 200px;
7 grid-template-rows: 50px 150px; 7 grid-template-rows: 50px 150px;
8 width: 500px; 8 width: 500px;
9 height: 300px; 9 height: 300px;
10 border: 5px solid black; 10 border: 5px solid black;
11 margin: 30px; 11 margin: 30px;
12 padding: 15px; 12 padding: 15px;
13 /* Ensures that the grid container is the containing block of the absolutely positioned grid children. */ 13 /* Ensures that the grid container is the containing block of the absolutely positioned grid children. */
14 position: relative; 14 position: relative;
15 } 15 }
16 16
17 .autoFit {
18 grid-template-columns: repeat(auto-fit, 100px);
19 grid-template-rows: repeat(auto-fit, 100px);
20 }
21
17 .absolute { 22 .absolute {
18 position: absolute; 23 position: absolute;
19 top: 0; 24 top: 0;
20 left: 0; 25 left: 0;
21 width: 100%; 26 width: 100%;
22 height: 100%; 27 height: 100%;
23 background: lime; 28 background: lime;
24 } 29 }
25 30
31 .gap { grid-gap: 10px; }
32
26 </style> 33 </style>
27 <script src="../../resources/testharness.js"></script> 34 <script src="../../resources/testharness.js"></script>
28 <script src="../../resources/testharnessreport.js"></script> 35 <script src="../../resources/testharnessreport.js"></script>
29 <script src="../../resources/check-layout-th.js"></script> 36 <script src="../../resources/check-layout-th.js"></script>
30 <body onload="checkLayout('.grid')"> 37 <body onload="checkLayout('.grid')">
31 <div id="log"></div> 38 <div id="log"></div>
32 39
33 <p>This test checks that positioned grid items can be placed directly on the pad ding.</p> 40 <p>This test checks that positioned grid items can be placed directly on the pad ding.</p>
34 41
35 <div class="grid"> 42 <div class="grid">
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 data-offset-x="0" data-offset-y="215" data-expected-width="215" data-exp ected-height="115"> 200 data-offset-x="0" data-offset-y="215" data-expected-width="215" data-exp ected-height="115">
194 </div> 201 </div>
195 <div class="absolute" style="grid-column: 2 / 3; grid-row: 3 / foo;" 202 <div class="absolute" style="grid-column: 2 / 3; grid-row: 3 / foo;"
196 data-offset-x="215" data-offset-y="215" data-expected-width="200" data-e xpected-height="115"> 203 data-offset-x="215" data-offset-y="215" data-expected-width="200" data-e xpected-height="115">
197 </div> 204 </div>
198 <div class="absolute" style="grid-column: 3 / foo; grid-row: 2 / 3;" 205 <div class="absolute" style="grid-column: 3 / foo; grid-row: 2 / 3;"
199 data-offset-x="0" data-offset-y="65" data-expected-width="215" data-expe cted-height="150"> 206 data-offset-x="0" data-offset-y="65" data-expected-width="215" data-expe cted-height="150">
200 </div> 207 </div>
201 </div> 208 </div>
202 209
210 <div class="grid autoFit gap">
211 <div class="absolute" style="grid-column: auto / 1; grid-row: auto / 1;"
212 data-offset-x="0" data-offset-y="0" data-expected-width="15" data-expec ted-height="15">
213 </div>
214 <div class="absolute" style="grid-column: -1 / auto; grid-row: -1 / auto;"
215 data-offset-x="15" data-offset-y="15" data-expected-width="515" data-ex pected-height="315">
216 </div>
217 </div>
218
219 <div class="grid autoFit gap">
220 <div class="absolute" style="grid-column: auto / 2; grid-row: auto / 2;"
221 data-offset-x="0" data-offset-y="0" data-expected-width="15" data-expec ted-height="15">
222 </div>
223 <div class="absolute" style="grid-column: -2 / auto; grid-row: -2 / auto;"
224 data-offset-x="15" data-offset-y="15" data-expected-width="515" data-ex pected-height="315">
225 </div>
226 </div>
227
228 <div class="grid autoFit directionRTL gap">
229 <div class="absolute" style="grid-column: auto / 1; grid-row: auto / 1;"
230 data-offset-x="515" data-offset-y="0" data-expected-width="15" data-exp ected-height="15">
231 </div>
232 <div class="absolute" style="grid-column: -1 / auto; grid-row: -1 / auto;"
233 data-offset-x="0" data-offset-y="15" data-expected-width="515" data-exp ected-height="315">
234 </div>
235 </div>
236
237 <div class="grid autoFit directionRTL gap">
238 <div class="absolute" style="grid-column: auto / 2; grid-row: auto / 2;"
239 data-offset-x="515" data-offset-y="0" data-expected-width="15" data-exp ected-height="15">
240 </div>
241 <div class="absolute" style="grid-column: -2 / auto; grid-row: -2 / auto;"
242 data-offset-x="0" data-offset-y="15" data-expected-width="515" data-exp ected-height="315">
243 </div>
244 </div>
245
203 </body> 246 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698