-
Notifications
You must be signed in to change notification settings - Fork 0
/
expandable-section.html
41 lines (37 loc) · 1.62 KB
/
expandable-section.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
<!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>DS in CSS - Expandable Section</title>
<link rel="shortcut icon" href="https://cdn.casebook.net/images/favicon.ico">
<link rel="stylesheet" type="text/css" href="./css/styles.css">
</head>
<body class="cb-baseline">
<main class="cb-main">
<h1 class="cb-h4 cb-bolder"><a class="cb-link" href="./index.html">DS in CSS</a></h1>
<h2 class="cb-h5 cb-margin-bottom-large">
Expandable sections
</h2>
<p>
Use the <code class="cb-inline-code"><details></code> and <code class="cb-inline-code"><summary></code> tags to create an expandable section. Add the class <code class="cb-inline-code">.cb-expandable</code> to the <code class="cb-inline-code"><details></code> tag.
</p>
<p>
Border styling and the open/close toggle icon are provided by the class <code class="cb-inline-code">.cb-expandable</code>. Visibility of the <code class="cb-inline-code"><summary></code> is provided by the semantic tags.
</p>
<div class="cb-flex cb-gap-default cb-flex-wrap-wrap">
<details class="cb-expandable">
<summary>Hello</summary>
<div class="cb-pad-default cb-pad-top-none">Yo</div>
</details>
</div>
<div class="cb-code-block-container">
<pre><details class="cb-expandable">
<summary>Hello</summary>
<div class="cb-pad-default cb-pad-top-none">Yo</div>
</details></pre>
</div>
</main>
</body>
</html>