-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathalert.html
More file actions
67 lines (62 loc) · 2.82 KB
/
alert.html
File metadata and controls
67 lines (62 loc) · 2.82 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>µCSS — Alert</title>
<link rel="stylesheet" href="../dist/mu.css">
</head>
<body>
<main class="container">
<hgroup>
<h1>Alert</h1>
<p>Notification banners in 11 color variants, with optional title and dismiss button.</p>
</hgroup>
<p><a href="index.html">← Back to examples</a></p>
<p><button class="btn btn-sm btn-secondary" onclick="document.documentElement.dataset.theme = document.documentElement.dataset.theme === 'dark' ? 'light' : 'dark'">Toggle dark mode</button></p>
<section>
<h2>All 11 color variants</h2>
<div class="alert alert-primary"><p>This is a <strong>primary</strong> alert.</p></div>
<div class="alert alert-secondary"><p>This is a <strong>secondary</strong> alert.</p></div>
<div class="alert alert-tertiary"><p>This is a <strong>tertiary</strong> alert.</p></div>
<div class="alert alert-contrast"><p>This is a <strong>contrast</strong> alert.</p></div>
<div class="alert alert-accent"><span class="alert-title">Accent</span> Eye-catching highlight.</div>
<div class="alert alert-success"><p>This is a <strong>success</strong> alert.</p></div>
<div class="alert alert-info"><p>This is an <strong>info</strong> alert.</p></div>
<div class="alert alert-warning"><p>This is a <strong>warning</strong> alert.</p></div>
<div class="alert alert-error"><p>This is an <strong>error</strong> alert.</p></div>
<div class="alert alert-pop"><span class="alert-title">Pop</span> Lighter accent variant.</div>
<div class="alert alert-spark"><span class="alert-title">Spark</span> Lighter contrast variant.</div>
</section>
<section>
<h2>With title</h2>
<div class="alert alert-success">
<span class="alert-title">Operation successful</span>
<p>Your changes have been saved. You can continue editing or return to the dashboard.</p>
</div>
<div class="alert alert-error">
<span class="alert-title">Something went wrong</span>
<p>Unable to process your request. Please try again later.</p>
</div>
</section>
<section>
<h2>Dismissible</h2>
<div class="alert alert-info alert-dismissible">
<span class="alert-title">Heads up!</span>
<p>This alert can be dismissed with the close button.</p>
<button class="alert-close" aria-label="Close" onclick="this.parentElement.remove()">×</button>
</div>
<div class="alert alert-warning alert-dismissible">
<p>A simple dismissible warning.</p>
<button class="alert-close" aria-label="Close" onclick="this.parentElement.remove()">×</button>
</div>
</section>
<section>
<h2>With links</h2>
<div class="alert alert-primary">
<p>Check the <a href="#">documentation</a> for more details.</p>
</div>
</section>
</main>
</body>
</html>