blob: 419088b4d5a8988990024eba02d959887ac1b3cb (
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
91
92
93
94
95
96
97
98
99
100
101
102
|
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Test: Specified alignment properties in subgridded axes</title>
<link rel="author" title="Ethan Jimenez" href="mailto:ethavar@microsoft.com">
<link rel="help" href="https://drafts.csswg.org/css-grid-2/#subgrid-box-alignment">
<style>
body {
margin: 0;
padding: 0;
font-size: 0;
}
.grid {
background: gray;
display: inline-grid;
grid-auto-rows: 100px;
grid-template-columns: 100px;
}
.subgrid {
margin: 10px;
padding: 10px;
display: grid;
background: orangered;
border: blue solid 10px;
grid-template: subgrid / subgrid;
}
.as { align-self: start; }
.ae { align-self: end; }
.ac { align-self: center; }
.ab { align-self: baseline; }
.js { justify-self: start; }
.je { justify-self: end; }
.jc { justify-self: center; }
.jb { justify-self: baseline; }
</style>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body onload="checkLayout('.item')">
<div class="grid">
<div class="subgrid as js">
<div class="item" data-offset-x="30" data-expected-width="40" data-offset-y="30" data-expected-height="40"></div>
</div>
<div class="subgrid as je">
<div class="item" data-offset-x="30" data-expected-width="40" data-offset-y="130" data-expected-height="40"></div>
</div>
<div class="subgrid as jc">
<div class="item" data-offset-x="30" data-expected-width="40" data-offset-y="230" data-expected-height="40"></div>
</div>
<div class="subgrid as jb">
<div class="item" data-offset-x="30" data-expected-width="40" data-offset-y="330" data-expected-height="40"></div>
</div>
</div>
<div class="grid">
<div class="subgrid ae js">
<div class="item" data-offset-x="130" data-expected-width="40" data-offset-y="30" data-expected-height="40"></div>
</div>
<div class="subgrid ae je">
<div class="item" data-offset-x="130" data-expected-width="40" data-offset-y="130" data-expected-height="40"></div>
</div>
<div class="subgrid ae jc">
<div class="item" data-offset-x="130" data-expected-width="40" data-offset-y="230" data-expected-height="40"></div>
</div>
<div class="subgrid ae jb">
<div class="item" data-offset-x="130" data-expected-width="40" data-offset-y="330" data-expected-height="40"></div>
</div>
</div>
<div class="grid">
<div class="subgrid ac js">
<div class="item" data-offset-x="230" data-expected-width="40" data-offset-y="30" data-expected-height="40"></div>
</div>
<div class="subgrid ac je">
<div class="item" data-offset-x="230" data-expected-width="40" data-offset-y="130" data-expected-height="40"></div>
</div>
<div class="subgrid ac jc">
<div class="item" data-offset-x="230" data-expected-width="40" data-offset-y="230" data-expected-height="40"></div>
</div>
<div class="subgrid ac jb">
<div class="item" data-offset-x="230" data-expected-width="40" data-offset-y="330" data-expected-height="40"></div>
</div>
</div>
<div class="grid">
<div class="subgrid ab js">
<div class="item" data-offset-x="330" data-expected-width="40" data-offset-y="30" data-expected-height="40"></div>
</div>
<div class="subgrid ab je">
<div class="item" data-offset-x="330" data-expected-width="40" data-offset-y="130" data-expected-height="40"></div>
</div>
<div class="subgrid ab jc">
<div class="item" data-offset-x="330" data-expected-width="40" data-offset-y="230" data-expected-height="40"></div>
</div>
<div class="subgrid ab jb">
<div class="item" data-offset-x="330" data-expected-width="40" data-offset-y="330" data-expected-height="40"></div>
</div>
</div>
</body>
|