d75f646611efcb340ccbc6d5c2c44fc29ecede7c
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / css-grid-layout / minmax-fixed-logical-width-only.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 .grid {
10     width: 100px;
11     height: 200px;
12 }
13
14 #grid1 {
15     grid-template-columns: minmax(20px, 80px) 60px;
16     grid-template-rows: 30px;
17 }
18
19 #grid2 {
20     /* First minmax more constraining than available logical width. */
21     grid-template-columns: minmax(50%, 60px) minmax(10px, 40%);
22     grid-template-rows: 30px;
23 }
24
25 #grid3 {
26     /* Overlapping range. */
27     grid-template-columns: minmax(10px, 80px) minmax(20px, 50px);
28     grid-template-rows: 30px;
29 }
30
31 #grid4 {
32     grid-template-columns: minmax(20px, 80px) 160px;
33     grid-template-rows: 30px;
34     -webkit-writing-mode: vertical-rl;
35 }
36
37 #grid5 {
38     /* 50% > 80px, 80px should be ignored. */
39     grid-template-columns: minmax(50%, 80px) minmax(10px, 60%);
40     grid-template-rows: 30px;
41     -webkit-writing-mode: vertical-lr;
42 }
43
44 #grid6 {
45     /* Overlapping range. */
46     grid-template-columns: minmax(10px, 180px) minmax(30px, 150px);
47     grid-template-rows: 30px;
48     -webkit-writing-mode: horizontal-bt;
49 }
50
51 .firstRowFirstColumn {
52     width: 100%;
53     height: 100%;
54 }
55
56 .firstRowSecondColumn {
57     width: 100%;
58     height: 100%;
59 }
60 </style>
61 <script src="../../resources/check-layout.js"></script>
62 <body onload="checkLayout('.grid')">
63
64 <p><a href="https://webkit.org/b/104700">Bug 104700<a>: [CSS Grid Layout] Implement grid items sizing for fixed minmax grid tracks</p>
65 <p>Checks that a grid element with fixed minmax properly compute the logical width in several writing-mode.</p>
66
67 <div class="grid" id="grid1" data-expected-width="100" data-expected-height="200">
68     <div class="firstRowFirstColumn" data-expected-height="30" data-expected-width="40"></div>
69     <div class="firstRowSecondColumn" data-expected-height="30" data-expected-width="60"></div>
70 </div>
71
72 <div class="grid" id="grid2" data-expected-width="100" data-expected-height="200">
73     <div class="firstRowFirstColumn" data-expected-height="30" data-expected-width="60"></div>
74     <div class="firstRowSecondColumn" data-expected-height="30" data-expected-width="40"></div>
75 </div>
76
77 <div class="grid" id="grid3" data-expected-width="100" data-expected-height="200">
78     <div class="firstRowFirstColumn" data-expected-height="30" data-expected-width="50"></div>
79     <div class="firstRowSecondColumn" data-expected-height="30" data-expected-width="50"></div>
80 </div>
81
82 <div class="grid" id="grid4" data-expected-width="100" data-expected-height="200">
83     <div class="firstRowFirstColumn" data-expected-height="40" data-expected-width="30"></div>
84     <div class="firstRowSecondColumn" data-expected-height="160" data-expected-width="30"></div>
85 </div>
86
87 <div class="grid" id="grid5" data-expected-width="100" data-expected-height="200">
88     <div class="firstRowFirstColumn" data-expected-height="100" data-expected-width="30"></div>
89     <div class="firstRowSecondColumn" data-expected-height="100" data-expected-width="30"></div>
90 </div>
91
92 <div class="grid" id="grid6" data-expected-width="100" data-expected-height="200">
93     <div class="firstRowFirstColumn" data-expected-height="30" data-expected-width="40"></div>
94     <div class="firstRowSecondColumn" data-expected-height="30" data-expected-width="60"></div>
95 </div>
96
97 </body>
98 </html>