-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreset.css
132 lines (114 loc) · 2.49 KB
/
reset.css
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
/* Default line height should be 1.5 for readability */
body {
line-height: 1.5;
-webkit-font-smoothing: antialiased;
}
/* Prevent font size inflation on some devices */
html {
-moz-text-size-adjust: none;
-webkit-text-size-adjust: none;
text-size-adjust: none;
}
/* Remove built-in form typography */
input,
button,
textarea,
select {
color: inherit;
font: inherit;
}
/* Some elements should have the pointer cursor */
button,
label,
select,
summary,
[role='button'],
[role='option'] {
cursor: pointer;
}
/* And some should have the not-allowed cursor */
:disabled,
[aria-disabled='true'],
label:has(> input:disabled),
label:has(+ input:disabled) {
cursor: not-allowed;
}
/* Avoid text overflows */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
overflow-wrap: break-word;
}
/* Balance text wrapping on higher level headings */
h1,
h2,
h3 {
line-height: calc(1em + 0.5rem);
text-wrap: balance;
}
/* Increase textarea heights when rows aren't set */
textarea:not([rows]) {
min-height: 10em;
}
/* Make sure text decoration won't interfere with font ascenders and descenders */
a:not([class]) {
text-decoration-skip-ink: auto;
}
/* Anchored elements should have some extra padding */
:target {
scroll-padding-block-start: 2rem;
}
/* Focused elements should also */
:focus {
scroll-padding-block-end: 8vh;
}
/* Ensure a nice focus indicator */
:is(a, button, input, textarea, select, summary) {
--outline-size: max(2px, 0.08em);
--outline-style: dashed;
--outline-offset: -0.32em;
--outline-color: currentColor;
}
:is(a, button, input, textarea, select, summary):focus,
:is(a, button, input, textarea, select, summary):focus-visible {
outline: var(--outline-size) var(--outline-style) var(--outline-color);
outline-offset: var(--outline-offset, var(--outline-size));
}
:is(a, button, input, textarea, select, summary):focus:not(:focus-visible) {
outline: none;
}
button {
--outline-offset: -0.32em;
}
a {
--outline-offset: 0.08em;
}
/* A visually hidden class that still shows up for screen readers */
.visually-hidden,
.sr-only {
position: absolute;
border: 0;
clip: rect(0, 0, 0, 0);
clip-path: inset(50%);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
white-space: nowrap;
width: 1px;
}
/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
*,
*::after,
*::before {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}