summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-align/blocks/align-content-block-break-content-020-aligned-ref.html
blob: 6a0e3871496869ccf983d9cb595103bf3718ae94 (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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
<!DOCTYPE html>
<title>CSS Box Alignment: align-content block fragmentation: complex block content</title>
<link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact">
<link rel="help" href="https://www.w3.org/TR/css-align-3/#align-block">

<style title="Needed for automation; delete to review/debug">
  @import "/fonts/ahem.css";
  html { font: 10px/1 Ahem; max-width: 800px; }
</style>

<style>
  .pager {
    column-fill: auto;
    column-width: 15em;
    height: 5em;
  }
  .test {
    height: 5em; break-inside: avoid;
    /* show bounds of test box without interfering with margin-collapsing */
    border-inline: solid black 1em;
  }
  .test:last-child {
    height: 4.5em;
  }
  .large, .float {
    height: 2.5em;
    break-inside: avoid;
    background: orange;
  }
  .float {
    float: right;
  }
  .margin {
    padding: 0.2em; /* using padding because of margin handling bugs
    margin-block: 0.5em;
  }
  .margin > * {
    margin-block: -0.3em;
switch back once fixed */
  }
  hr {
    border: solid 1px; margin: 0.5em;
  }

  /* readability */
  .pager { border: solid 2px gray; margin: 0.5em 0; }
  .test { color: #8888; text-align: center; }
  .label { color: black; font-weight: bold; }

  /* reference */
  .center .test { align-content: center; }
  .end    .test { align-content: end; }
  /* margins are truncated by unforced breaks, so mimic that */
  .test .large:first-child { margin-top: 0; }
  .test .large:last-child  { margin-bottom: 0; }
</style>

<!--
   This test creates breaks:
     * between two blocks with collapsing negative margins
     * through the middle of a float
     * through some nested text
     * after a nested float
-->

<div class="pager center">
  <div class="test">
    <span class="label">CENTER</span>
    <div class="margin">
      <div class="large"></div>
    </div>
  </div>
  <div class="test">
    <div class="margin">
      <div class="large"></div>
    </div>
    LINE 1<br>LINE 2
  </div>
  <div class="test">
    <div class="float">FLT</div>
    LINE 3
    <hr>
    <div>
      LINE 4<br>LINE 5
    </div>
  </div>
  <div class="test">
    <div>
      LINE 6
      <div class="float">FLT</div>
    </div>
    LINE 7
  </div>
</div>

<div class="pager end">
  <div class="test">
    <span class="label">END</span>
    <div class="margin">
      <div class="large"></div>
    </div>
  </div>
  <div class="test">
    <div class="margin">
      <div class="large"></div>
    </div>
    LINE 1<br>LINE 2
  </div>
  <div class="test">
    <div class="float">FLT</div>
    LINE 3
    <hr>
    <div>
      LINE 4<br>LINE 5
    </div>
  </div>
  <div class="test">
    <div>
      LINE 6
      <div class="float">FLT</div>
    </div>
    LINE 7
  </div>
</div>

<div class="pager">
  <div class="test">
    <span class="label">BASELINE</span>
    <div class="margin">
      <div class="large"></div>
    </div>
  </div>
  <div class="test">
    <div class="margin">
      <div class="large"></div>
    </div>
    LINE 1<br>LINE 2
  </div>
  <div class="test">
    <div class="float">FLT</div>
    LINE 3
    <hr>
    <div>
      LINE 4<br>LINE 5
    </div>
  </div>
  <div class="test">
    <div>
      LINE 6
      <div class="float">FLT</div>
    </div>
    LINE 7
  </div>
</div>

<div class="pager">
  <div class="test">
    <span class="label">LAST BASELINE</span>
    <div class="margin">
      <div class="large"></div>
    </div>
  </div>
  <div class="test">
    <div class="margin">
      <div class="large"></div>
    </div>
    LINE 1<br>LINE 2
  </div>
  <div class="test">
    <div class="float">FLT</div>
    LINE 3
    <hr>
    <div>
      LINE 4<br>LINE 5
    </div>
  </div>
  <div class="test">
    <div>
      LINE 6
      <div class="float">FLT</div>
    </div>
    LINE 7
  </div>
</div>

<div class="pager center">
  <div class="test">
    <span class="label">UNSAFE CENTER</span>
    <div class="margin">
      <div class="large"></div>
    </div>
  </div>
  <div class="test">
    <div class="margin">
      <div class="large"></div>
    </div>
    LINE 1<br>LINE 2
  </div>
  <div class="test">
    <div class="float">FLT</div>
    LINE 3
    <hr>
    <div>
      LINE 4<br>LINE 5
    </div>
  </div>
  <div class="test">
    <div>
      LINE 6
      <div class="float">FLT</div>
    </div>
    LINE 7
  </div>
</div>

<div class="pager end">
  <div class="test">
    <span class="label">UNSAFE END</span>
    <div class="margin">
      <div class="large"></div>
    </div>
  </div>
  <div class="test">
    <div class="margin">
      <div class="large"></div>
    </div>
    LINE 1<br>LINE 2
  </div>
  <div class="test">
    <div class="float">FLT</div>
    LINE 3
    <hr>
    <div>
      LINE 4<br>LINE 5
    </div>
  </div>
  <div class="test">
    <div>
      LINE 6
      <div class="float">FLT</div>
    </div>
    LINE 7
  </div>
</div>