summaryrefslogtreecommitdiffstats
path: root/layout/reftests/css-grid/grid-repeat-auto-fill-fit-012.html
blob: 7ed0843af2d64a5f401fe94560ff793197b51204 (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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<!DOCTYPE HTML>
<!--
     Any copyright is dedicated to the Public Domain.
     http://creativecommons.org/publicdomain/zero/1.0/
-->
<html><head>
  <meta charset="utf-8">
  <title>CSS Grid Test: repeat(auto-fit) with removed tracks</title>
  <link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1417711">
  <link rel="help" href="https://drafts.csswg.org/css-grid/#valdef-repeat-auto-fill">
  <link rel="match" href="grid-repeat-auto-fill-fit-012-ref.html">
  <style type="text/css">
html,body {
  color:black; background-color:white; font:16px/1 monospace; padding:0px; margin:0;
}

.container {
  width: 200px;
}

.grid {
  position: relative;
  display: grid;
  grid: 10px / repeat(auto-fit, 30px);
  grid-auto-columns: 2px;
  background: lightgrey;
  margin-bottom: 4px;
  grid-gap: 5px;
}
.distribute {
  grid-gap: 0;
  align-content: space-around;
}

span {
  background: blue;
  height: 10px;
}

.abs {
  position: absolute;
  top:0; right:0; bottom:0; left:0;
  grid-column-end: span 1;
  background: pink;
}

  </style>
</head>
<body>

<div class="container">
<div class="grid">
<span style="grid-column: 4 / 5" class="abs"></span>
<span style="grid-column: 3"></span>
</div>
</div>

<div class="container">
<div class="grid">
<span style="grid-column: 4 / 5" class="abs"></span>
<span style="grid-column: 1"></span>
</div>
</div>

<div class="container">
<div class="grid">
<span style="grid-column: 1 / 5" class="abs"></span>
<span style="grid-column: 1"></span>
</div>
</div>

<div class="container">
<div class="grid">
<span style="grid-column: 2 / 5" class="abs"></span>
<span style="grid-column: 2"></span>
</div>
</div>

<div class="container">
<div class="grid">
<span style="grid-column: 2 / 5" class="abs"></span>
<span style="grid-column: 2 / 4"></span>
</div>
</div>

<div class="container">
<div class="grid">
<span style="grid-column: 2 / 5" class="abs"></span>
<span style="grid-column: 4 / 5"></span>
</div>
</div>

<div class="container">
<div class="grid">
<span style="grid-column: 2 / 5" class="abs"></span>
</div>
</div>

<div class="container">
<div class="grid">
<span style="grid-column: 2 / 10" class="abs"></span>
</div>
</div>

<div class="container">
<div class="grid distribute">
<span style="grid-column: 4 / 5" class="abs"></span>
<span style="grid-column: 3"></span>
</div>
</div>

<div class="container">
<div class="grid distribute">
<span style="grid-column: 4 / 5" class="abs"></span>
<span style="grid-column: 1"></span>
</div>
</div>

<div class="container">
<div class="grid distribute">
<span style="grid-column: 1 / 5" class="abs"></span>
<span style="grid-column: 1"></span>
</div>
</div>

<div class="container">
<div class="grid distribute">
<span style="grid-column: 2 / 5" class="abs"></span>
<span style="grid-column: 2"></span>
</div>
</div>

<div class="container">
<div class="grid distribute">
<span style="grid-column: 2 / 5" class="abs"></span>
<span style="grid-column: 2 / 4"></span>
</div>
</div>

<div class="container">
<div class="grid distribute">
<span style="grid-column: 2 / 5" class="abs"></span>
<span style="grid-column: 4 / 5"></span>
</div>
</div>

<div class="container">
<div class="grid distribute">
<span style="grid-column: 2 / 5" class="abs"></span>
</div>
</div>

<div class="container">
<div class="grid distribute">
<span style="grid-column: 2 / 10" class="abs"></span>
</div>
</div>

</body>
</html>