-
Notifications
You must be signed in to change notification settings - Fork 0
/
avatar.html
87 lines (80 loc) · 4.43 KB
/
avatar.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
<!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 - Avatar</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">
Avatars
</h2>
<p>Style an element like a Casebook avatar with the class <code class="cb-inline-code">.cb-avatar</code>.
This defaults to the small size, but size can be set explicitly by adding one of: <code
class="cb-inline-code">.cb-extra-small</code>, <code class="cb-inline-code">.cb-small</code>,
<code class="cb-inline-code">.cb-medium</code>, <code class="cb-inline-code">.cb-large</code>, or
<code class="cb-inline-code">.cb-extra-large</code>.
</p>
<p>
Be sure to specify a color and a background color for an Avatar.
</p>
<div class="cb-flex cb-gap-default cb-flex-wrap-wrap">
<div class="cb-avatar cb-extra-small cb-text-color-primary cb-background-color-patina-100">
XS
</div>
<div class="cb-avatar cb-small cb-text-color-primary cb-background-color-heather-50">
SM
</div>
<div class="cb-avatar cb-medium cb-text-color-primary cb-background-color-framboise-25">
MD
</div>
<div class="cb-avatar cb-large cb-text-color-primary cb-background-color-millennial-100">
LG
</div>
<div class="cb-avatar cb-extra-large cb-text-color-primary cb-background-color-ocean-100">
XL
</div>
</div>
<div class="cb-code-block-container">
<pre><div class="cb-avatar cb-extra-small cb-text-color-primary cb-background-color-patina-100">XS</div>
<div class="cb-avatar cb-small cb-text-color-primary cb-background-color-heather-50">SM</div>
<div class="cb-avatar cb-medium cb-text-color-primary cb-background-color-framboise-25">MD</div>
<div class="cb-avatar cb-large cb-text-color-primary cb-background-color-millennial-100">LG</div>
<div class="cb-avatar cb-extra-large cb-text-color-primary cb-background-color-ocean-100">XL</div></pre>
</div>
<h3 id="avatar-buttons" class="cb-h6 cb-margin-bottom-large cb-margin-top-large">Avatar buttons</h3>
<p>The examples above are HTML <code class="cb-inline-code"><div></code> elements, but HTML <code
class="cb-inline-code"><button></code>s can also be rendered as Avatars:</p>
<div class="cb-flex cb-gap-default cb-flex-wrap-wrap">
<button class="cb-avatar cb-extra-small cb-text-color-primary cb-background-color-patina-100" onclick="alert('you clicked XS');">
XS
</button>
<button class="cb-avatar cb-small cb-text-color-primary cb-background-color-heather-50" onclick="alert('you clicked SM');">
SM
</button>
<button class="cb-avatar cb-medium cb-text-color-primary cb-background-color-framboise-25" onclick="alert('you clicked MD');">
MD
</button>
<button class="cb-avatar cb-large cb-text-color-primary cb-background-color-millennial-100" onclick="alert('you clicked LG');">
LG
</button>
<button class="cb-avatar cb-extra-large cb-text-color-primary cb-background-color-ocean-100" onclick="alert('you clicked XL');">
XL
</button>
</div>
<div class="cb-code-block-container">
<pre
class="cb-caption cb-monospace fullwidth cb-no-margin"><button class="cb-avatar cb-extra-small cb-text-color-primary cb-background-color-patina-100" onclick="alert('you clicked XS');">XS</button>
<button class="cb-avatar cb-small cb-text-color-primary cb-background-color-heather-50" onclick="alert('you clicked SM');">SM</button>
<button class="cb-avatar cb-medium cb-text-color-primary cb-background-color-framboise-25" onclick="alert('you clicked MD');">MD</button>
<button class="cb-avatar cb-large cb-text-color-primary cb-background-color-millennial-100" onclick="alert('you clicked LG');">LG</button>
<button class="cb-avatar cb-extra-large cb-text-color-primary cb-background-color-ocean-100" onclick="alert('you clicked XL');">XL</button></pre>
</div>
</main>
</body>
</html>