-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
157 lines (152 loc) · 4.23 KB
/
index.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<!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>outline</title>
<!--
Need a visual blank slate?
Remove all code in `styles.css`!
-->
<link rel="stylesheet" href="style.css" />
<script type="module" src="script.js"></script>
</head>
<body>
<h1>outline</h1>
<h2>Try it</h2>
<button type="button">outline: solid;</button>
<button type="button">outline: dashed red;</button>
<button type="button">outline: 1rem solid;</button>
<button type="button">outline: thick double #32a1ce;</button>
<button type="button">
outline: 8px ridge rgba(170, 50, 220, .6); border-radius: 2rem;
</button>
<div id="target" class="outline0">
This is a box with an outline around it.
</div>
<h2>Constituent properties</h2>
<ul>
<li>outline-color</li>
<li>outline-style</li>
<li>outline-width</li>
</ul>
<h2>Syntax</h2>
<pre>
/* style */
outline: solid;
/* color | style */
outline: #f66 dashed;
/* style | width */
outline: inset thick;
/* color | style | width */
outline: green solid 3px;
/* Global values */
outline: inherit;
outline: initial;
outline: revert;
outline: revert-layer;
outline: unset;
</pre>
<h2>Values</h2>
<ul>
<li><code><'outline-color'></code></li>
<li><code><'outline-style'></code></li>
<li><code><'outline-line'></code></li>
</ul>
<h2>Description</h2>
<ul>
<li>border</li>
<li>outline-offset</li>
<li>border-radius</li>
</ul>
<h2>Accessibility concerns</h2>
<ul>
<li>How to Design Useful and Usable Focus Indicators</li>
<li>WCAG 2.1: Understanding Success Criterion 2.4.7: Focus Visible</li>
</ul>
<h2>Formal definition</h2>
<table>
<tbody>
<tr>
<th>Initial value</th>
<td>as each of the properties of the shorthand:</td>
</tr>
<tr>
<th>Applies to</th>
<td>all elements</td>
</tr>
<tr>
<th>Inherited</th>
<td>no</td>
</tr>
<tr>
<th>Computed value</th>
<td>as each of the properties of the shorthand:</td>
</tr>
<tr>
<th>Animation type</th>
<td>as each of the properties of the shorthand:</td>
</tr>
</tbody>
</table>
<h2>Formal syntax</h2>
<pre>
outline =
<'outline-color'> ||
<'outline-style'> ||
<'outline-width'>
</pre>
<h2>Examples</h2>
<strong>👍 Using outline to set a focus style</strong>
<h3>HTML</h3>
<pre>
<a href="#">This link has a special focus style.</a>
</pre>
<h3>CSS</h3>
<pre>
a {
border: 1px solid;
border-radius: 3px;
display: inline-block;
margin: 10px;
padding: 5px;
}
a:focus {
outline: 4px dotted #e73;
outline-offset: 4px;
background: #ffa;
}
</pre>
<h3>Result</h3>
<div class="result">
<a id="result" href="#">This link has a special focus style.</a>
</div>
<h2>Specifications</h2>
<h3>Specification</h3>
<ul>
<li>
CSS Basic User Interface Module Level 4
<ul>
<li># outline</li>
</ul>
</li>
</ul>
<h2>Browser compatibility</h2>
<p>Report problems with this compatibility data on GitHub desktop</p>
<small>📌 Tip: you can click/tap on a cell for more information.</small>
<ul>
<li>Full support</li>
<li>Partial support</li>
<li>No support</li>
<li>Requires a vendor prefix or different name for use.</li>
<li>Has more compatibility info.</li>
</ul>
<h2>See also</h2>
<ul>
<li>outline-color</li>
<li>outline-style</li>
<li>outline-width</li>
</ul>
</body>
</html>