summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-align/blocks/align-content-block-break-content-020.html
blob: 83267301b4c1c9d54598b71165a8ddb0fc3ddc44 (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
<!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">
<meta name="flags" content="may">
<!-- fragmented alignment is underdefined; these are two possibilities -->
<link rel="match" href="align-content-block-break-content-010-aligned-ref.html">
<link rel="match" href="align-content-block-break-content-010-unaligned-ref.html">

<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: 19.5em;
    /* show bounds of test box without interfering with margin-collapsing */
    border-inline: solid black 1em;
  }
  .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; }
</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">
  <div class="test" style="align-content: center">
      <span class="label">CENTER</span>
      <div class="margin">
        <div class="large"></div>
        <div class="large"></div>
      </div>
      LINE 1<br>
      <div class="float">FLT</div>
      LINE 2<br>LINE 3
      <hr>
      <div>
        LINE 4<br>LINE 5<br>LINE 6
        <div class="float">FLT</div>
      </div>
      LINE 7
    </div>
  </div>
</div>

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

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

<div class="pager">
  <div class="test" style="align-content: last baseline">
      <span class="label">LAST BASELINE</span>
      <div class="margin">
        <div class="large"></div>
        <div class="large"></div>
      </div>
      LINE 1<br>
      <div class="float">FLT</div>
      LINE 2<br>LINE 3
      <hr>
      <div>
        LINE 4<br>LINE 5<br>LINE 6
        <div class="float">FLT</div>
      </div>
      LINE 7
    </div>
  </div>
</div>

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

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