summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/css-grid-layout/quirks-mode-percent-resolution-grid-item.html
blob: 058116661a778612f8acbbd7d287eba9a9ec7657 (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
<html>
<link href="resources/grid.css" rel="stylesheet">
<style>
.grid {
    grid-template-columns: 100px 300px;
    grid-template-rows: 50px 150px;
}

.percentWidth {
    width: 100%;
    height: 15px;
}

.percentHeight {
    width: 15px;
    height: 100%;
}

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

<p>Test that resolving percent lengths on grid items works properly on a fixed grid with different writing modes in quirks mode.</p>

<div class="grid">
    <div class="firstRowFirstColumn percentWidth" data-expected-width="100" data-expected-height="15"></div>
    <div class="firstRowSecondColumn percentHeight" data-expected-width="15" data-expected-height="50"></div>
    <div class="secondRowFirstColumn percentHeightAndWidth" data-expected-width="100" data-expected-height="150"></div>
    <div class="secondRowSecondColumn percentHeightAndWidth" data-expected-width="300" data-expected-height="150"></div>
</div>

<div class="grid verticalRL">
    <div class="firstRowFirstColumn percentWidth" data-expected-width="50" data-expected-height="15"></div>
    <div class="firstRowSecondColumn percentHeight" data-expected-width="15" data-expected-height="300"></div>
    <div class="secondRowFirstColumn percentHeightAndWidth" data-expected-width="150" data-expected-height="100"></div>
    <div class="secondRowSecondColumn percentHeightAndWidth" data-expected-width="150" data-expected-height="300"></div>
</div>

<div class="grid">
    <div class="firstRowFirstColumn percentWidth verticalRL" data-expected-width="100" data-expected-height="15"></div>
    <div class="firstRowSecondColumn percentHeight verticalRL" data-expected-width="15" data-expected-height="50"></div>
    <div class="secondRowFirstColumn percentHeightAndWidth verticalRL" data-expected-width="100" data-expected-height="150"></div>
    <div class="secondRowSecondColumn percentHeightAndWidth verticalRL" data-expected-width="300" data-expected-height="150"></div>
</div>

<div class="grid">
    <div class="firstRowFirstColumn percentWidth verticalRL" data-expected-width="100" data-expected-height="15"></div>
    <div class="firstRowSecondColumn percentHeight" data-expected-width="15" data-expected-height="50"></div>
    <div class="secondRowFirstColumn percentHeightAndWidth verticalRL" data-expected-width="100" data-expected-height="150"></div>
    <div class="secondRowSecondColumn percentHeightAndWidth" data-expected-width="300" data-expected-height="150"></div>
</div>
</body>
</html>