-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathgrid-display.html
95 lines (85 loc) · 3.44 KB
/
grid-display.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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>display: grid | inline-grid; // CSS example</title>
<link rel="stylesheet" href="css-example.css">
<style id="base">.container {
padding: 8px;
gap: 8px;
border: 8px solid silver;
}
.item {
padding: 8px;
background: coral;
}
</style>
</head>
<body>
<h1 class="h1">display:<br> grid | inline-grid;</h1>
<details class="details">
<summary class="summary">Syntax details:</summary>
<dl class="spec">
<dt class="spec__term">Name:</dt>
<dd class="spec__def">display</dd>
<dt class="spec__term">New values:</dt>
<dd class="spec__def">grid | inline-grid</dd>
</dl>
<p class="p">(|): Exactly one of them must occur.</p>
</details>
<hr class="hr">
<section id="try" class="section">
<h2 class="h2">Applies to: <mark id="applies" class="mark">#container</mark></h2>
<ul class="list">
<li class="list__item">
<input class="list__input" type="radio" name="display" id="block" checked>
<label class="list__label" for="block">display: block;</label>
</li>
<li class="list__item">
<input class="list__input" type="radio" name="display" id="inline-block">
<label class="list__label" for="inline-block">display: inline-block;</label>
</li>
<li class="list__item">
<input class="list__input" type="radio" name="display" id="flex">
<label class="list__label" for="flex">display: flex;</label>
</li>
<li class="list__item">
<input class="list__input" type="radio" name="display" id="inline-flex">
<label class="list__label" for="inline-flex">display: inline-flex;</label>
</li>
<li class="list__item">
<input class="list__input" type="radio" name="display" id="grid">
<label class="list__label" for="grid">display: grid;</label>
</li>
<li class="list__item">
<input class="list__input" type="radio" name="display" id="inline-grid">
<label class="list__label" for="inline-grid">display: inline-grid;</label>
</li>
</ul>
</section>
<hr class="hr">
<section class="section">
<h2 class="h2"><mark class="mark"><output id="selector" class="selector"></output> <output id="declaration" class="declaration"></output></mark></h2>
<div class="demo">
🌼
<div id="container" class="container">
<div class="item item--1">1️⃣</div>
<div class="item item--2">2️⃣ 2️⃣</div>
<div class="item item--3">3️⃣ 3️⃣ 3️⃣</div>
</div>
🌼
</div>
<details class="details">
<summary class="summary">Base code:</summary>
<pre class="pre"><code id="base-output" class="code code--block code--base"></code></pre>
</details>
</section>
<hr class="hr">
<p class="p">
<a class="link" href="https://www.w3.org/TR/css-grid-1/#grid-model">https://www.w3.org/TR/css-grid-1/#grid-model</a>
</p>
<script src="css-example.js"></script>
</body>
</html>