summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-grid/masonry/tentative/masonry-not-inhibited-001.html
blob: 54499d3d693a3059204a0a1015638f303ef3caa4 (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
<!DOCTYPE HTML>
<meta charset="utf-8">
<title>CSS Grid Test: Masonry layout shouldn't be inhibited simply due to being an independent formatting context (unlike subgrid)</title>
<link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
<link rel="help" href="https://drafts.csswg.org/css-grid-3/">
<link rel="match" href="masonry-not-inhibited-001-ref.html">
<style>
grid {
  vertical-align: top;
  display: inline-grid;
  grid-template-columns: 60px 60px;
  grid-template-rows: masonry;
  border: 2px solid black;
}
.overflowSet {
  overflow: hidden;
}
.containSet {
  contain: layout;
}
item {
  width: 60px;
  height: 30px;
  background: cyan;
}
.tall {
    /* This item is taller than the others, which lets us know if masonry
       layout is being applied or not. If we're using masonry, then the second
       and third items will stack in the same column.  If not, then the third
       item will automatically fill in below this tall item. */
    height: 60px;
    background: tan;
}
</style>
<grid>
  <item class="tall"></item>
  <item></item>
  <item></item>
</grid>
<grid class="overflowSet">
  <item class="tall"></item>
  <item></item>
  <item></item>
</grid>
<grid class="containSet">
  <item class="tall"></item>
  <item></item>
  <item></item>
</grid>
<grid class="containSet overflowSet">
  <item class="tall"></item>
  <item></item>
  <item></item>
</grid>