3b23123e0f5885f24b4f75c3f33fdf24dd52c055
[WebKit-https.git] / LayoutTests / fast / css-grid-layout / grid-item-with-percent-height-in-auto-height-grid-resolution.html
1 <!DOCTYPE html>
2 <html>
3 <script>
4 if (window.testRunner)
5     testRunner.overridePreference("WebKitCSSGridLayoutEnabled", 1);
6 </script>
7 <link href="resources/grid.css" rel="stylesheet">
8 <style>
9 .gridMinMaxMinMax {
10     -webkit-grid-template-columns: 50px 100px;
11     -webkit-grid-template-rows: minmax(10px, -webkit-min-content) minmax(50px, 100px);
12 }
13
14 .gridAutoAuto {
15     -webkit-grid-template-columns: 50px 100px;
16     -webkit-grid-template-rows: auto auto;
17 }
18 </style>
19 <script src="../../resources/check-layout.js"></script>
20 <body onload="checkLayout('.grid')">
21
22 <p>Test that grid items with a percentage logical height inside a grid without explicit sizes resolve their size properly.</p>
23
24 <div class="unconstrainedContainer" style="position: relative">
25 <div class="grid gridMinMaxMinMax">
26     <div class="sizedToGridArea firstRowFirstColumn" data-expected-width="50" data-expected-height="20">XXXXX XXXXXX</div>
27     <div class="sizedToGridArea firstRowSecondColumn" data-expected-width="100" data-expected-height="20">XXXXX XXXXXX</div>
28     <div class="sizedToGridArea secondRowFirstColumn" data-expected-width="50" data-expected-height="100">XXXXX XXXXXX</div>
29     <div class="sizedToGridArea secondRowSecondColumn" data-expected-width="100" data-expected-height="100">XXXXX XXXXXX</div>
30 </div>
31 </div>
32
33 <div style="position: relative; height: 100px;">
34 <div class="grid gridMinMaxMinMax">
35     <div class="sizedToGridArea firstRowFirstColumn" data-expected-width="50" data-expected-height="20">XXXXX XXXXXX</div>
36     <div class="sizedToGridArea firstRowSecondColumn" data-expected-width="100" data-expected-height="20">XXXXX XXXXXX</div>
37     <div class="sizedToGridArea secondRowFirstColumn" data-expected-width="50" data-expected-height="80">XXXXX XXXXXX</div>
38     <div class="sizedToGridArea secondRowSecondColumn" data-expected-width="100" data-expected-height="80">XXXXX XXXXXX</div>
39 </div>
40 </div>
41
42 <div class="unconstrainedContainer" style="position: relative">
43 <div class="grid gridAutoAuto">
44     <div class="sizedToGridArea firstRowFirstColumn" data-expected-width="50" data-expected-height="30">XXXXX XXXXXX</div>
45     <div class="sizedToGridArea firstRowSecondColumn" data-expected-width="100" data-expected-height="30">XXXXX XXXXX XXXXXX</div>
46     <div class="sizedToGridArea secondRowFirstColumn" data-expected-width="50" data-expected-height="40">XXXXX XXXXXX</div>
47     <div class="sizedToGridArea secondRowSecondColumn" data-expected-width="100" data-expected-height="40">XXXXX XXXXX XXXXX XXXXXX</div>
48 </div>
49 </div>
50
51 </body>
52 </html>