summaryrefslogtreecommitdiff
path: root/layout/reftests/css-grid/grid-container-baselines-003-ref.html
blob: aadbb6bda275f10c99f1434c5220b130ea29c98c (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
<!DOCTYPE HTML>
<!--
     Any copyright is dedicated to the Public Domain.
     http://creativecommons.org/publicdomain/zero/1.0/
-->
<html><head>
  <meta charset="utf-8">
  <title>Reference: Grid container baselines, nested flex/grid/table</title>
  <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1151204">
  <link rel="stylesheet" type="text/css" href="support/ahem.css">
  <style type="text/css">
html,body {
    color:black; background-color:white; font:16px/1 Ahem; padding:0; margin:0;
}

.ib {
  display: inline-table;
  height: 163px;
  width: 120px;
  border: 1px solid;
  margin: 1px;
}
.ib2 {
  display: inline-flex;
  border: 1px solid;
  margin: 1px;
}

span { display: inline-table; }
.a {
  border: 3px solid black;
  background:lime;
}

span:nth-of-type(1) { font-size:32px; }
span:nth-of-type(2) { font-size:36px; }
span:nth-of-type(3) { font-size:48px; }
span:nth-of-type(4) { font-size:24px; }
span.i { font-size:12px; grid-column:2; }
.f { display:inline-flex; }

.hl { writing-mode: horizontal-tb; direction:ltr; }
.hr { writing-mode: horizontal-tb; direction:rtl; }
.vl { writing-mode: vertical-lr; text-orientation: sideways; }
.vr { writing-mode: vertical-rl; text-orientation: sideways; }
.vlr { writing-mode: vertical-lr; direction:rtl; text-orientation: sideways; }
.vrl { writing-mode: vertical-rl; direction:ltr; text-orientation: sideways; }

.igrid {
  display: inline-grid;
  grid: 13px repeat(3,50px) / 60px 60px;
  border: 1px solid;
  margin: 1px;
}
/* don't clamp grid item automatic minimum size */
* {
  min-width: 0;
  min-height: 0;
}
.slb { align-self:last baseline; align-content:self-end; }

</style>
</head>
<body>

A<div class="ib">
  <div class="ib" style="height:120px; width:56px;"><span
     class="a f" style="width:30px; padding-bottom:5px;">A<br>B</span>
  </div><span class="i a f" style="width:54px">C<br>D</span>
</div></div>

<div class="ib" style="width:180px;">
  <div class="ib" style="height:120px; width:56px;"><span
     class="a f" style="width:30px; padding-top:5px; margin-top:7px">A<br>B</span>
  </div><span class="i a f" style="width:54px">C<br>D</span><span
     class="a f" style="width:54px; padding-top:20px">E<br>F</span>
</div>

<div class="ib" style="width:180px;">
  <div class="ib" style="height:120px; width:56px;"><span
     class="a f" style="width:30px; margin-top:7px; padding-top:5px; padding-bottom:18px;">A<br>B</span>
  </div><span class="i a f" style="width:54px">C<br>D</span><span
     class="a f" style="width:54px; padding-top:20px">E<br>F</span>
</div>


<div class="ib" style="width:200px;">
  <div class="ib" style="height:120px; width:76px; white-space:nowrap"><span
     class="a f" style="width:30px; margin-top:7px; padding-top:5px; padding-bottom:18px;">A<br>B</span><span
     class="a f" style="float:right; width:30px; position:relative; left:-4px; padding-bottom:22px; margin-top:-100px">A<br>B</span>
  </div><span class="i a f" style="width:54px">C<br>D</span><span
     class="a f" style="width:54px; padding-top:20px;">E<br>F</span>
</div>

<br>

<x style="position:relative; top:-64px">A</x><div class="ib" style="width:200px;margin-top:32px">
  <div class="ib vl" style="height:70px; width:196px;">
    <span class="a" style="display:block; padding-block-end:15px; height:1px">A<br>B</span>
  </div>
</div><div class="ib" style="width:200px">
  <div class="ib vl" style="height:70px; width:196px;">
    <span class="a" style="display:block; padding-block-end:15px; width:148px; height:1px">A<br>B</span>
  </div>
</div><div class="ib" style="width:200px;position:relative; top:-31px">
  <div class="ib vl" style="height:70px; width:196px;">
    <span class="a" style="display:block; height:-moz-min-content; padding-block-end:15px; width:148px; height:-moz-min-content">A<br>B</span>
  </div>
</div>

<br>

A<div class="igrid slb">
  <div class="igrid slb" style="grid: 7px 13px 100px / 36px 3px; grid-row: span 4;">
    <n></n>
    <n style="grid-row:2"></n>
    <span class="slb a" style="margin-bottom:7px; padding-bottom:5px; grid-row:3; display:inline-block">A<br>B</span>
  </div>
  <span class="slb i a" style="grid-row:4; display:inline-block">C<br>D</span>
  <n></n>
</div>

</body>
</html>