File: focus.css

package info (click to toggle)
elixir-ex-doc 0.35.1%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,784 kB
  • sloc: javascript: 2,848; makefile: 15; xml: 12; sh: 5
file content (41 lines) | stat: -rw-r--r-- 1,096 bytes parent folder | download
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
/* For backwards compatibility, style :focus state so that it works in all browsers,
but unstyle not-focus-visible focus state in browsers that support focus-visible */

/* extra button selectors necessary to overwrite normalize.css */
*:focus,
button:focus,
[type="button"]:focus,
[type="reset"]:focus,
[type="submit"]:focus {
  outline: 2px solid var(--main);
  /* negative offset to make outline visible when overflow hidden */
  outline-offset: -2px;
}

*:focus:not(:focus-visible),
button:focus:not(:focus-visible),
[type="button"]:focus:not(:focus-visible),
[type="reset"]:focus:not(:focus-visible),
[type="submit"]:focus:not(:focus-visible) {
  outline: 0;
}

/* inputs you can type into don't need an extra focus style
because they have a visible cursor */
input[type="text"],
input[type="number"],
input[type="date"],
input[type="datetime"],
input[type="datetime-local"],
input[type="email"],
input[type="month"],
input[type="number"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="time"],
input[type="url"],
input[type="week"],
textarea {
  outline: 0;
}