blob: 171fcd3fcde8dd0b7b9e866569cf4d29449ece44 (
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
|
<!DOCTYPE html>
<title>
Grid Item (First) Baseline Inline-Axis Alignment: auto-width grid, auto column, auto items
</title>
<link rel="help" href="https://drafts.csswg.org/css-grid-1/#column-align">
<link rel="help" href="https://www.w3.org/TR/css-grid-1/#algo-content">
<link rel="help" href="https://www.w3.org/TR/css-align-3/#baseline-values">
<link rel="match" href="references/grid-baseline-justify-001-ref.html">
<style>
@import "/fonts/ahem.css";
.grid {
border: solid silver;
margin: 1em 2px;
font: 20px/1 Ahem;
display: inline-grid;
vertical-align: top;
grid-template-rows: repeat(4, max-content);
}
.grid > div {
border: black 10px;
border-style: none solid;
color: orange;
writing-mode: vertical-rl;
}
div + div {
font-size: 2em;
}
div + div + div {
font-size: 50%;
}
.self > div {
justify-self: baseline;
}
.content > div {
align-content: baseline;
}
div.stretch {
justify-self: stretch;
}
.ref {
position: relative;
width: 96px;
height: 80px;
}
.ref > div {
position: absolute;
}
.ref1 { right: 16px; }
.ref2 { top: 20px;
right: 0px; }
.ref3 { right: 24px;
top: 60px; }
.ref4 { bottom: 0px;
right: 0px;
left: 0px;
height: 10px; }
.ref.content > div:not(.stripe) {
border-color: transparent;
}
.stripe {
width: 76px;
height: 80px;
}
</style>
<p>Test passes if each pair of boxes is identical.</p>
<div class="grid self">
<div>
p<br>
p<br>
p
</div>
<div>
p
</div>
<div>
p
</div>
<div class="stretch">
</div>
</div>
<div class="grid self ref">
<div class="ref1">
p<br>
p<br>
p
</div>
<div class="ref2">
p
</div>
<div class="ref3">
p
</div>
<div class="ref4">
</div>
</div>
<br>
<div class="grid content">
<div>
p<br>
p<br>
p
</div>
<div>
p
</div>
<div>
p
</div>
<div class="stretch">
</div>
</div>
<div class="grid content ref">
<div class="ref1">
p<br>
p<br>
p
</div>
<div class="ref2">
p
</div>
<div class="ref3">
p
</div>
<div class="ref4">
</div>
<div class="stripe">
</div>
</div>
|