summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/css-grid-layout/minmax-fixed-logical-height-only.html
blob: 12ddd5033477d5382bef5941968bb4b697db6686 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<!DOCTYPE html>
<html>
<link href="resources/grid.css" rel="stylesheet">
<style>
.grid {
    width: 100px;
    height: 200px;
}

#grid1 {
    grid-template-columns: 30px;
    grid-template-rows: minmax(20px, 80px) 160px;
}

#grid2 {
    grid-template-columns: 30px;
    grid-template-rows: minmax(50%, 120px) minmax(20px, 40%);
}

#grid3 {
    grid-template-columns: 30px;
    /* Overlapping range. */
    grid-template-rows: minmax(10px, 180px) minmax(30px, 150px);
}

#grid4 {
    grid-template-columns: 30px;
    grid-template-rows: minmax(20px, 80px) 60px;
}

#grid5 {
    grid-template-columns: 30px;
    /* 90% > 80px, 80px should be ignored. */
    grid-template-rows: minmax(90%, 80px) minmax(10px, 60%);
}

#grid6 {
    /* Overlapping range. */
    grid-template-columns: 30px;
    grid-template-rows: minmax(10px, 180px) minmax(30px, 150px);
}

.firstRowFirstColumn {
    width: 100%;
    height: 100%;
}

.secondRowFirstColumn {
    width: 100%;
    height: 100%;
}
</style>
<script src="../../resources/check-layout.js"></script>
<body onload="checkLayout('.grid')">

<p><a href="https://webkit.org/b/104700">Bug 104700<a>: [CSS Grid Layout] Implement grid items sizing for fixed minmax grid tracks</p>
<p>Checks that a grid element with fixed minmax properly compute the logical height in several writing-mode.</p>

<div class="grid" id="grid1" data-expected-width="100" data-expected-height="200">
    <div class="firstRowFirstColumn" data-expected-height="40" data-expected-width="30"></div>
    <div class="secondRowFirstColumn" data-expected-height="160" data-expected-width="30"></div>
</div>

<div class="grid" id="grid2" data-expected-width="100" data-expected-height="200">
    <div class="firstRowFirstColumn" data-expected-height="120" data-expected-width="30"></div>
    <div class="secondRowFirstColumn" data-expected-height="80" data-expected-width="30"></div>
</div>

<div class="grid" id="grid3" data-expected-width="100" data-expected-height="200">
    <div class="firstRowFirstColumn" data-expected-height="90" data-expected-width="30"></div>
    <div class="secondRowFirstColumn" data-expected-height="110" data-expected-width="30"></div>
</div>

<div class="grid verticalRL" id="grid4" data-expected-width="100" data-expected-height="200">
    <div class="firstRowFirstColumn" data-expected-height="30" data-expected-width="40"></div>
    <div class="secondRowFirstColumn" data-expected-height="30" data-expected-width="60"></div>
</div>

<div class="grid verticalLR" id="grid5" data-expected-width="100" data-expected-height="200">
    <div class="firstRowFirstColumn" data-expected-height="30" data-expected-width="90"></div>
    <div class="secondRowFirstColumn" data-expected-height="30" data-expected-width="10"></div>
</div>

<div class="grid horizontalBT" id="grid6" data-expected-width="100" data-expected-height="200">
    <div class="firstRowFirstColumn" data-expected-height="90" data-expected-width="30"></div>
    <div class="secondRowFirstColumn" data-expected-height="110" data-expected-width="30"></div>
</div>

</body>
</html>