summaryrefslogtreecommitdiffstats
path: root/layout/reftests/css-grid/grid-item-align-001-ref.html
blob: 35bb263ac730ae88423beb36a7835e3b903d9e10 (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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
<!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: align-self (part 1 of 2)</title>
  <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1151213">
  <style type="text/css">
html,body {
    color:black; background-color:white; font-size:16px; padding:0; margin:0;
}
separator { clear:both; display:block; height:6px; }

.grid {
  display: block;
  float: left;
  position: relative;
  border: 1px solid;
  border-block-start: 2px solid blue;
  inline-size: 36px;
  block-size: 25px;
  margin-right: 4px;
}

span {
  display: block;
  position: relative;
  z-index: 1;
  width: 13px;
  height: 9px;
  background: grey;
  border-block-start: 2px solid blue;
  border-inline-start: 2px solid lime;
  margin: 1px 1px 2px 2px;
  offset-inline-start: 1px;
}

abs1,abs2,abs3,abs4 {
  position: absolute;
  top:0;left:0;bottom:0;right:0;
  background: white;
}
abs1 {
  border-block-start-width: 3px;
  border-block-end-width: 2px;
  border-inline-start-width: 1px;
  border-inline-end-width: 3px;
  border-style: solid;
  border-color: lightgrey;
}
abs2 { display:none; }
abs3 { display:none;  }
abs4 { display:none;  }

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

.astart,.aflexstart,.aleft,.aright,.astretch1,.astretch2,.astretch2,.astretch3,
.astretch4,.astretch5,.astretch6,.astretch7,.aauto {
  offset-block-start: 3px;
}

.aend,.aflexend { offset-block-start: 9px; }
.acenter {  offset-block-start: 5px; margin-block-start:2px; }

.hl .astretch2, .hr .astretch2 { height: 15px; }
.hl .astretch3, .hr .astretch3 { height: 15px; }

.astretch2 { width:13px; height:auto; }
.astretch3 { height:auto; }
.astretch4 { width:0; }
.astretch5 { width:0; }
.astretch6 { height:9px; }
.astretch7 { width:0; height:9px; }

.hl .hr {margin-left:4px;}
.hl .vl {offset-block-start: 1px; offset-inline-start:3px;}
.hl .vl.aend, .hl .vl.aflexend { margin-top: 7px; }
.hl .vl.acenter { margin-top:4px; }

.hl .vr {margin-left:6px; margin-top:3px; }
.hl .vr.aend, .hl .vr.aflexend {margin-left:12px; margin-top:9px; }
.hl .vr.acenter {margin-left:8px; margin-top:6px; }

.hl .vlr { margin-left:0px;  margin-top:5px; }
.hl .vlr.aend, .hl .vlr.aflexend {margin-left:-6px; margin-top:11px; }
.hl .vlr.acenter {margin-left:-2px; margin-top:8px; }

.hl .vrl { margin-left:6px;  margin-top:3px; }
.hl .vrl.aend, .hl .vrl.aflexend {margin-left:12px; margin-top:9px; }
.hl .vrl.acenter {margin-left:8px; margin-top:6px; }

.hr .hl {margin-right:3px}

.hr .vl {margin-right:5px; margin-top:5px; }
.hr .vl.aend, .hr .vl.aflexend {margin-right:11px; margin-top:11px; }
.hr .vl.acenter {margin-right:7px; margin-top:8px; }

.hr .vr {margin-top:5px; margin-right:-1px; }
.hr .vr.aend, .hr .vr.aflexend {margin-top:11px; margin-right:-7px; }
.hr .vr.acenter {margin-top:8px; margin-right:-3px; }
.hr .vr.astretch6, .hr .vr.astretch7 { margin-right:-1px; }

.hr .vlr {margin-top:5px; margin-right:5px;  }
.hr .vlr.aend, .hr .vlr.aflexend {margin-top:11px; margin-right:11px; }
.hr .vlr.acenter {margin-top:8px; margin-right:7px; }

.hr .vrl {margin-top:3px; margin-right:-1px;  }
.hr .vrl.aend, .hr .vrl.aflexend {margin-top:9px; margin-right:-7px; }
.hr .vrl.acenter {margin-top:6px; margin-right:-3px; }

.vl span { offset-block-start: 1px; offset-inline-start: 3px; }
.vl .astretch4 { width:15px; }
.vl .astretch5 { width:13px; }

.vl .hl.aend, .vl .hl.aflexend { margin-left:4px; }
.vl .hl.acenter { margin-left:3px; margin-top:1px; }
.vl .astretch6, .vl .astretch7 { height:0px; }
.vl .hr.astretch6, .vl .hr.astretch7 { height:0px; }

.vl .hr { margin-left:8px; }
.vl .hr.aend, .vl .hr.aflexend { margin-left:10px; }
.vl .hr.acenter { margin-left:9px; margin-top:1px; }

.vl .vl { margin-top:-1px; margin-left:4px; }
.vl .vl.aend, .vl .vl.aflexend { margin-left:6px; }
.vl .vl.acenter { margin-left:5px; margin-top:-1px; }
.vl .astretch7 { width:13px; }

.vl .vl.astretch2,  .vl .vl.astretch3,
.vl .vr.astretch2,  .vl .vr.astretch3,
.vl .vlr.astretch2, .vl .vlr.astretch3,
.vl .vrl.astretch2, .vl .vrl.astretch3 { height:0px; }

.vl .vr  { margin-top:-1px; margin-left:6px;  }
.vl .vr.aend, .vl .vr.aflexend { margin-left:8px; }
.vl .vr.acenter { margin-left:7px; margin-top:-1px; }

.vl .vlr { margin-top:5px; margin-left:4px;  }
.vl .vlr.aend, .vl .vlr.aflexend { margin-left:6px; }
.vl .vlr.acenter { margin-left:5px; }

.vl .vrl { margin-top:-1px; margin-left:6px;  }
.vl .vrl.aend, .vl .vrl.aflexend { margin-left:8px; }
.vl .vrl.acenter { margin-left:7px; }


</style>
</head>
<body>

<script>
var gridwm = [ "hl", "hr", "vl" ]; // grid-item-align-002.html tests vr/vlr/vrl
var wm = [ "hl", "hr", "vl", "vr", "vlr", "vrl" ];
var test = [ "start", "end", "flexstart", "flexend", "center", "left", "right",
             "stretch1", "stretch2", "stretch3", "stretch4", "stretch5",
             "stretch6", "stretch7", "auto" ];
for (var i = 0; i < gridwm.length; ++i) {
  for (var j = 0; j < wm.length; ++j) {
    for (var k = 0; k < test.length; ++k) {
      var div = document.createElement("div");
      div.className = "grid " + gridwm[i];
      var span = document.createElement("span");
      span.className = wm[j] + " a" + test[k];
      div.appendChild(span);
      div.appendChild(document.createElement("abs1"));
      div.appendChild(document.createElement("abs2"));
      div.appendChild(document.createElement("abs3"));
      div.appendChild(document.createElement("abs4"));

      document.body.appendChild(div)
    }
    document.body.appendChild(document.createElement("separator"));
  }
}
</script>


</body>
</html>