summaryrefslogtreecommitdiffstats
path: root/layout/reftests/box/box-as-grid-or-flex-item-1.html
blob: 6eacbd94a3605f36e87872936579f8c5da48b6db (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
<!DOCTYPE html>
<title>Test for bug 1580302</title>
<style>
  .grid, .flex {
    width: 60px;
    height: 60px;
    border: 1px solid black;
  }
  .grid { display: grid; }
  .flex { display: flex; }
  .fCol { flex-direction: column; }

  .item {
    display: -moz-box;
    background: lightblue;
  }
  .flexible {
    flex: 1;
  }
</style>
<body>
  <!-- The item should fill the grid here (by virtue of justify-items/align-items
       default behavior): -->
  <div class="grid">
    <div class="item">e</div>
  </div>

  <!-- For the rest, the item should fill the flex container in the cross axis,
       and if it's flexible, also fill the container in the main axis. -->
  <div class="flex">
    <div class="item">e</div>
  </div>
  <div class="flex">
    <div class="item flexible">e</div>
  </div>
  <div class="flex fCol">
    <div class="item">e</div>
  </div>
  <div class="flex fCol">
    <div class="item flexible">e</div>
  </div>
</body>