summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-break/flexbox/single-line-row-flex-fragmentation-042-print.html
blob: f8a2934ac5a9d9a9f2b67867545dd37486cae38a (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
<!DOCTYPE html>
<html>
  <meta charset="utf-8">
  <link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
  <link rel="author" title="Mozilla" href="https://www.mozilla.org/">
  <link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#pagination">
  <link rel="match" href="single-line-row-flex-fragmentation-042-print-ref.html">

  <style>
  @page { size: 5in 3in; margin: 0.5in; }
  body { margin: 0; }

  .flexbox {
    display: flex;
    border: 0.25in solid black;
    font-size: 0.25in;
  }
  .item {
    contain: size;
    box-sizing: border-box;
    border: 4px solid purple;
    width: 25%;
    height: 0.5in;
  }
  </style>

  <!-- This div makes the flexbox not at the top of first page. -->
  <div style="height: 0.25in; background: gray;"></div>

  <div class="flexbox">
    <div class="item" style="margin-top: 1in;">1</div>
    <div class="item">2</div>

    <!-- Due to fragmentation, item 3 is being pushed down and placed at the top
         of page 2, enlarging the flex container's block-size. Observe item 3
         and item 4's block-end edges. Before fragmentation, both are at the
         same level; after fragmentation, item 3's block-end edge becomes lower
         than item 4's, and making item 4's block-end edge no longer touch the
         flex container's content-box block-end edge.-->
    <div class="item" style="margin-top: 1in; height: 1in;">3</div>
    <div class="item" style="align-self: flex-end;">4</div>
  </div>

  <div style="height: 0.25in; background: gray;"></div>
</html>