summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-grid/subgrid/subgrid-stretch.html
blob: 321e12d2a3ba6d1bab3623c385153b2375c1b441 (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
<!DOCTYPE HTML>
<html><head>
  <meta charset="utf-8">
  <title>CSS Grid Test: The subgrid is always stretched in its subgridded dimension(s)</title>
  <link rel="author" title="Matt Woodrow" href="mailto:mattwoodrow@apple.com">
  <link rel="help" href="https://drafts.csswg.org/css-grid-2/#subgrid-box-alignment">
  <link rel="match" href="subgrid-stretch-ref.html">
  <style>
  body {
    margin: 0;
  }
  .grid {
    display: inline-grid;
    grid-template-columns: 100px;
    grid-template-rows: 100px;
  }
  .subgrid {
    display: grid;
    background-color: blue;
  }
  .rows {
    grid-template-rows: subgrid;
    align-self: baseline;
  }
  .columns {
    grid-template-columns: subgrid;
    justify-self: baseline;
  }
  .vrl {
    writing-mode: vertical-rl;
  }
  .vrl.rows {
    align-self: initial;
    justify-self: baseline;
  }
  .vrl.columns {
    justify-self: initial;
    align-self: baseline;
  }
  </style>
</head>
<body>
  <div class="grid">
    <div class="subgrid rows" style="height: 50px;"></div>
  </div>
  <div class="grid">
    <div class="subgrid rows" style="height: 150px;"></div>
  </div>
  <div class="grid">
    <div class="subgrid rows" style="max-height: 50px;"></div>
  </div>
  <div class="grid">
    <div class="subgrid rows" style="min-height: 150px;"></div>
  </div>
  <div class="grid">
    <div class="subgrid columns" style="width: 50px;"></div>
  </div>
  <div class="grid">
    <div class="subgrid columns" style="width: 150px;"></div>
  </div>
  <div class="grid">
    <div class="subgrid columns" style="max-width: 50px;"></div>
  </div>
  <div class="grid">
    <div class="subgrid columns" style="min-width: 150px;"></div>
  </div>

  <br>

  <div class="grid">
    <div class="subgrid vrl rows" style="width: 50px;"></div>
  </div>
  <div class="grid">
    <div class="subgrid vrl rows" style="width: 150px;"></div>
  </div>
  <div class="grid">
    <div class="subgrid vrl rows" style="max-width: 50px;"></div>
  </div>
  <div class="grid">
    <div class="subgrid vrl rows" style="min-width: 150px;"></div>
  </div>
  <div class="grid">
    <div class="subgrid vrl columns" style="height: 50px;"></div>
  </div>
  <div class="grid">
    <div class="subgrid vrl columns" style="height: 150px;"></div>
  </div>
  <div class="grid">
    <div class="subgrid vrl columns" style="max-height: 50px;"></div>
  </div>
  <div class="grid">
    <div class="subgrid vrl columns" style="min-height: 150px;"></div>
  </div>

</body>
</html>