-
Notifications
You must be signed in to change notification settings - Fork 0
/
link.html
87 lines (69 loc) · 4.04 KB
/
link.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 - Link</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">
Links
</h2>
<p>Style an <code class="cb-inline-code"><a></code> element to act like a Casebook link by adding the class
<code class="cb-inline-code">.cb-link</code>.
</p>
<div class="cb-margin-default-vertical cb-flex cb-gap-default cb-flex-wrap-wrap">
<a class="cb-link" href="#bar">Link</a>
</div>
<div class="cb-code-block-container">
<pre><a class="cb-link" href="#bar">Link</a></pre>
</div>
<h3 id="color-decoration" class="cb-h6 cb-margin-bottom-large cb-margin-top-large">Color and decoration</h3>
<p>Links have a specific color by default, but can also be made to inherit their parent color with <code
class="cb-inline-code">.cb-color-inherit</code>.</p>
<p>Links have an underline by default, but that can be omitted with <code
class="cb-inline-code">.cb-no-underline</code>.</p>
<div class="cb-margin-default-vertical cb-flex cb-gap-default cb-flex-wrap-wrap">
<a class="cb-link cb-color-inherit" href="https://example.com">
Link inheriting color</a>
<a class="cb-link cb-no-underline" href="https://example.com">
Link with no underline</a>
<a class="cb-link cb-no-underline cb-color-inherit" href="https://example.com">
Link with no underline inheriting color</a>
</div>
<div class="cb-code-block-container">
<pre><a class="cb-link" href="#bar">Link</a>
<a class="cb-link cb-color-inherit" href="https://example.com">Link inheriting color</a>
<a class="cb-link cb-no-underline" href="https://example.com">Link with no underline</a>
<a class="cb-link cb-no-underline cb-color-inherit" href="https://example.com">Link with no underline inheriting color</a></pre>
</div>
<h3 id="external-links" class="cb-h6 cb-margin-bottom-large cb-margin-top-large">External links</h3>
Links that have <code class="cb-inline-code">target="_blank"</code> or have the class <code
class="cb-inline-code">.cb-link-external</code> have an appended icon indicating that they will open something
outside the current page.
<div class="cb-margin-default-vertical cb-flex cb-gap-default cb-flex-wrap-wrap">
<a class="cb-link" href="https://example.com" target="_blank" rel="noreferrer">link with target blank</a>
<a class="cb-link cb-color-inherit" href="https://example.com" target="_blank" rel="noreferrer">link with target
blank inheriting color</a>
<a class="cb-link cb-no-underline" href="https://example.com" target="_blank" rel="noreferrer">link with target
blank and no underline</a>
</div>
<div class="cb-margin-default-vertical cb-flex cb-gap-default cb-flex-wrap-wrap">
<a class="cb-link-external" href="https://example.com">
External link class</a>
</div>
<div class="cb-code-block-container">
<pre><a class="cb-link" href="https://example.com" target="_blank" rel="noreferrer">link with target blank</a>
<a class="cb-link cb-color-inherit" href="https://example.com" target="_blank" rel="noreferrer">link with target blank inheriting color</a>
<a class="cb-link cb-no-underline" href="https://example.com" target="_blank" rel="noreferrer">link with target blank and no underline</a>
<a class="cb-link-external" href="https://example.com">External link class</a></pre>
</div>
<p>See also <a class="cb-link" href="./button.html#links">links styled as buttons</a>.</p>
</main>
</body>
</html>