File: masonry-align-tracks-multi-001.html

package info (click to toggle)
thunderbird 1%3A78.8.0-1~deb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,910,720 kB
  • sloc: cpp: 5,890,568; javascript: 4,416,354; ansic: 3,051,657; python: 917,001; asm: 304,197; xml: 206,624; sh: 109,232; java: 108,679; makefile: 22,984; perl: 15,867; yacc: 4,565; objc: 3,026; pascal: 1,787; lex: 1,720; ada: 1,681; cs: 879; exp: 505; awk: 485; sql: 452; php: 436; lisp: 432; ruby: 99; sed: 69; csh: 45
file content (91 lines) | stat: -rw-r--r-- 2,439 bytes parent folder | download | duplicates (8)
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
<!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: Masonry layout with multiple `align-tracks` values</title>
  <link rel="author" title="Mats Palmgren" href="mailto:mats@mozilla.com">
  <link rel="help" href="https://drafts.csswg.org/css-grid-2">
  <link rel="match" href="masonry-align-tracks-multi-001-ref.html">
<style>
html,body {
  color:black; background-color:white; font:15px/1 monospace; padding:0; margin:0;
}
grid {
  display: inline-grid;
  grid-template-rows: masonry;
  grid-template-columns: repeat(8,50px); /*intentionally one more than align-tracks values*/
  gap: 3px 5px;
  padding: 10px 3px 1px 7px;
  border: solid;
  border-width: 1px 7px 3px 5px;
  background: lightgrey content-box;
  align-tracks: start,end,center,stretch,space-between,space-around,space-evenly;
  height: 500px;
  vertical-align: top;
}
.fallback { grid-template-columns:3px; padding:0; border:0; }
item {
  background: grey;
  height: 2em;
  position: relative;
  border: 1px solid;
}
item:nth-child(2n) { background:purple; height:auto; border-top:3px solid; }
z { display: block; background: yellow; height: 20%; width:80%; }
a {
 position: absolute;
 inset: 0;
 top: auto;
 border: 2px solid lime;
}
</style>
</head>
<body>
<grid>
  <item style="width:50%">1</item>
  <item style="height:10%">2</item>
  <item style="margin-left:10%">3</item>
  <item style="margin-top:10%">4</item>
  <item>5</item>
  <item>6<a></a></item>
  <item>7</item>
  <item style="writing-mode:vertical-lr">8 vertical-lr</item>
  <item>9<a></a></item>
  <item>10</item>
  <item>11</item>
  <item>12<z></z></item>
  <item>13</item>
  <item><z></z>14<a></a></item>
  <item>15</item>
  <item style="writing-mode:vertical-rl">16 vertical-rl</item>
  <item>17</item>
  <item>18</item>
  <item>19</item>
  <item>20</item>
  <item>21</item>
  <item>22</item>
  <item>23</item>
  <item>24</item>
  <item>25</item>
  <item>26</item>
  <item>27</item>
  <item>28</item>
  <item>29</item>
  <item>30</item>
  <item>31</item>
  <item>32</item>
  <item>33</item>
</grid>
<grid class="fallback" style="align-tracks:space-between">
  <item></item>
</grid>
<grid class="fallback" style="align-tracks:space-around">
  <item></item>
</grid>
<grid class="fallback" style="align-tracks:space-evenly">
  <item></item>
</grid>
</body></html>