blob: 6ba0b89c3c38b018113a2ac6cbd86e063108b6cc (
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
|
<!DOCTYPE html>
<html>
<link href="resources/grid.css" rel="stylesheet">
<style>
.grid {
grid-template-columns: 50px 100px 150px;
grid-template-rows: 25px 50px 100px;
width: 300px;
height: 200px;
border: 5px solid black;
margin: 20px 30px;
padding: 5px 15px;
}
.container {
width: 500px;
height: 400px;
}
.relative {
/* Ensures that the element is the containing block of the absolutely positioned elements. */
position: relative;
}
.absolute {
position: absolute;
}
</style>
<script src="../../resources/check-layout.js"></script>
<body onload="checkLayout('.container')">
<p>This test checks the behavior of the absolutely positioned elements with a grid container as parent.</p>
<div class="container relative">
<div class="grid">
<div class="sizedToGridArea absolute autoRowAutoColumn" data-offset-x="50" data-offset-y="10" data-expected-width="500" data-expected-height="400"></div>
</div>
</div>
<div class="container relative">
<div class="grid">
<div class="sizedToGridArea absolute firstRowFirstColumn" data-offset-x="50" data-offset-y="10" data-expected-width="500" data-expected-height="400"></div>
</div>
</div>
<div class="container relative">
<div class="grid">
<div class="sizedToGridArea absolute secondRowSecondColumn" data-offset-x="50" data-offset-y="10" data-expected-width="500" data-expected-height="400"></div>
</div>
</div>
<div class="container">
<div class="grid relative">
<div class="sizedToGridArea absolute autoRowAutoColumn" data-offset-x="15" data-offset-y="5" data-expected-width="330" data-expected-height="210"></div>
</div>
</div>
<div class="container">
<div class="grid relative">
<div class="sizedToGridArea absolute firstRowFirstColumn" data-offset-x="15" data-offset-y="5" data-expected-width="315" data-expected-height="205"></div>
</div>
</div>
<div class="container">
<div class="grid relative">
<div class="sizedToGridArea absolute secondRowSecondColumn" data-offset-x="65" data-offset-y="30" data-expected-width="265" data-expected-height="180"></div>
</div>
</div>
</body>
</html>
|