summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-grid/masonry/tentative/justify-tracks/masonry-justify-tracks-stretch-002-ref.html
blob: 69759484f298f1220f87c73a582131812b2cf407 (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
<!DOCTYPE HTML>
<!--
     Any copyright is dedicated to the Public Domain.
     http://creativecommons.org/publicdomain/zero/1.0/
-->
<html><head>
  <meta charset="utf-8">
  <title>Reference: Masonry layout with `justify-tracks:stretch`</title>
  <link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com">
<style>
html,body {
  color:black; background-color:white; font:6px/1 monospace; padding:0; margin:0;
}
grid {
  display: inline-grid;
  grid-template-columns: auto auto;
  grid-template-rows: 30px;
  gap: 1px 2px;
  padding: 2px 3px 1px 1px;
  border-style: solid;
  border-width: 1px 7px 3px 5px;
  border-inline-start-color: magenta;
  border-block-start-color: blue;
  background: lightgrey content-box;
  inline-size: 25px;
  vertical-align: top;
}
item {
  border-inline-start: 1px solid magenta;
  border-block-start: 2px solid blue;
}
item:nth-child(2n+1) { background: grey; }
item:nth-child(2n) { background: cyan; }
.hl { writing-mode: horizontal-tb; direction:ltr; }
.hr { writing-mode: horizontal-tb; direction:rtl; }
.vll { writing-mode: vertical-lr; direction:ltr; }
.vlr { writing-mode: vertical-lr; direction:rtl; }
.vrl { writing-mode: vertical-rl; direction:ltr; }
.vrr { writing-mode: vertical-rl; direction:rtl; }
.swl { writing-mode: sideways-lr; direction:ltr; }
.swr { writing-mode: sideways-lr; direction:rtl; }
</style>
</head>
<body>
<div style="display:none">
<grid>
  <item>1</item>
  <item>2a<br>2b</item>
</grid>
</div>
<script>
let wms = [ "hl", "hr", "vll", "vrr", "vlr", "vrl", "swl", "swr", ];
let grid = document.getElementsByTagName('grid')[0];
for (const reorder of [false, true]) {
  for (const cb_wm of wms) {
    for (const child_wm of wms) {
      let e = grid.cloneNode(true);
      e.className = cb_wm;
      e.children[1].className = child_wm;
      if (reorder) {
        e.children[0].style.order = '1';
      }
      document.body.appendChild(e);
    }
  }
}
</script>
</body></html>