-
Notifications
You must be signed in to change notification settings - Fork 0
/
definition-list.html
97 lines (88 loc) · 4.62 KB
/
definition-list.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
96
97
<!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 - Definition lists</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">
Definition lists
</h2>
<p>
Use the <code class="cb-inline-code"><dl></code>, <code class="cb-inline-code"><dt></code> and <code class="cb-inline-code"><dd></code> tags to create a definition list. Add the class <code class="cb-inline-code">.cb-definition-list</code> to the <code class="cb-inline-code"><dl></code> tag.
</p>
<p>
In the example below, <code class="cb-inline-code">.cb-definition-list</code> is combined with <a class="cb-link" href="./layout.html">layout-related column classes</a> (<code class="cb-inline-code">.cb-column-12-xs</code>, <code class="cb-inline-code">.cb-column-6-sm</code>, <code class="cb-inline-code">.cb-column-4-md</code> and <code class="cb-inline-code">.cb-column-3-lg-up</code>) to achieve a flexible responsive layout.
</p>
<div class="cb-flex cb-flex-wrap-wrap">
<dl class="cb-definition-list cb-column-12-xs cb-column-6-sm cb-column-4-md cb-column-3-lg-up">
<dt>Name</dt>
<dd>Mary Ellen Richmond</dd>
</dl>
<dl class="cb-definition-list cb-column-12-xs cb-column-6-sm cb-column-4-md cb-column-3-lg-up">
<dt>Date of birth</dt>
<dd><time datetime="1891-08-05">Aug 5, 1891</time></dd>
</dl>
<dl class="cb-definition-list cb-column-12-xs cb-column-6-sm cb-column-4-md cb-column-3-lg-up">
<dt>Legacy ID</dt>
<dd>10000000045</dd>
</dl>
</div>
<div class="cb-code-block-container">
<pre><div class="cb-flex cb-flex-wrap-wrap">
<dl class="cb-definition-list cb-column-12-xs cb-column-6-sm cb-column-4-md cb-column-3-lg-up">
<dt>Name</dt>
<dd>Mary Ellen Richmond</dd>
</dl>
<dl class="cb-definition-list cb-column-12-xs cb-column-6-sm cb-column-4-md cb-column-3-lg-up">
<dt>Date of birth</dt>
<dd><time datetime="1891-08-05">Aug 5, 1891</time></dd>
</dl>
<dl class="cb-definition-list cb-column-12-xs cb-column-6-sm cb-column-4-md cb-column-3-lg-up">
<dt>Legacy ID</dt>
<dd>10000000045</dd>
</dl>
</div></pre>
</div>
<h3 id="unpadded" class="cb-h6 cb-margin-bottom-large cb-margin-top-large">Unpadded definition lists</h3>
<p>By default, definition lists have padding at the top, right, and bottom (it's actually applied to the <code class="cb-inline-code"><dt></code> and <code class="cb-inline-code"><dd></code> tags within the definition list).</p>
<p>You can remove the padding by adding the class <code class="cb-inline-code">.unpadded</code> to the <code class="cb-inline-code"><dl></code> tag.</p>
<div class="cb-flex cb-flex-wrap-wrap">
<dl class="cb-definition-list unpadded cb-column-12-xs cb-column-6-sm cb-column-4-md cb-column-3-lg-up">
<dt>Name</dt>
<dd>Mary Ellen Richmond</dd>
</dl>
<dl class="cb-definition-list unpadded cb-column-12-xs cb-column-6-sm cb-column-4-md cb-column-3-lg-up">
<dt>Date of birth</dt>
<dd><time datetime="1891-08-05">Aug 5, 1891</time></dd>
</dl>
<dl class="cb-definition-list unpadded cb-column-12-xs cb-column-6-sm cb-column-4-md cb-column-3-lg-up">
<dt>Legacy ID</dt>
<dd>10000000045</dd>
</dl>
</div>
<div class="cb-code-block-container">
<pre><div class="cb-flex cb-flex-wrap-wrap">
<dl class="cb-definition-list unpadded cb-column-12-xs cb-column-6-sm cb-column-4-md cb-column-3-lg-up">
<dt>Name</dt>
<dd>Mary Ellen Richmond</dd>
</dl>
<dl class="cb-definition-list unpadded cb-column-12-xs cb-column-6-sm cb-column-4-md cb-column-3-lg-up">
<dt>Date of birth</dt>
<dd><time datetime="1891-08-05">Aug 5, 1891</time></dd>
</dl>
<dl class="cb-definition-list unpadded cb-column-12-xs cb-column-6-sm cb-column-4-md cb-column-3-lg-up">
<dt>Legacy ID</dt>
<dd>10000000045</dd>
</dl>
</div></pre>
</div>
</main>
</body>
</html>