-
Notifications
You must be signed in to change notification settings - Fork 708
/
Copy pathjustify-tracks-example-1.html
58 lines (57 loc) · 1.37 KB
/
justify-tracks-example-1.html
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
<!DOCTYPE HTML>
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<style>
.grid {
display: inline-grid;
grid: 150px 100px 50px / masonry;
gap: 3px;
padding: 10px;
border: 3px solid;
background: lightgrey content-box;
width: 150px;
transition: width 6s linear;
}
item {
display: list-item;
list-style-type: decimal;
list-style-position: inside;
background: grey;
width: 3ch;
position: relative;
}
item:nth-child(2n) { background:purple; width:auto; }
item:nth-child(1) { border:10px solid; margin: 10px 0 5px 3px; }
z { display: block; background: yellow; width: 20%; height:10%; }
a {
position: absolute;
inset: 0;
left: auto;
border: 2px solid lime;
}
</style>
<body onload="[...document.querySelectorAll('.grid')].forEach(e=>e.style.width='600px')">
<div class="grid">
<item></item>
<item></item>
<item></item>
<item style="max-width:80px; margin-right: 10px">80px</item>
<item></item>
<item><a></a></item>
<item></item>
<item style="writing-mode:vertical-lr">vertical</item>
<item><a></a></item>
<item>A<br>B</item>
<item></item>
<item><z></z></item>
<item></item>
<item><z></z><a></a></item>
<item></item>
<item style="justify-self:start"></item>
<item></item>
<item style="margin:0 auto"></item>
<item></item>
<item style="margin-left: auto"></item>
</div><td>