-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreset.css
166 lines (146 loc) · 2.76 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
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
158
159
160
161
162
163
164
165
166
/* Box sizing rules */
*,
*::before,
*::after {
box-sizing: border-box;
}
/* Remove default margin */
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd,
ul,
ol {
margin: 0;
}
/* Adjust line heights */
h1,
.h1,
h2,
.h2,
h3,
.h3 {
line-height: 1;
}
/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role="list"],
ol[role="list"] {
padding-left: 0;
list-style: none;
}
/* Set core root defaults */
html {
scroll-behavior: smooth;
}
/* Set core body defaults */
body {
min-height: 100vh;
text-rendering: optimizeSpeed;
}
/* Make images easier to work with */
img,
picture {
display: block;
max-width: 100%;
}
img[width] {
width: auto; /* Defer to max-width */
}
img[width][height] {
height: auto; /* Preserve aspect ratio */
}
/* Let SVG scale without boundaries */
/*
img[src$=".svg"] {
width: 100%;
height: auto;
max-width: none;
} */
/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
font: inherit;
}
/* Remove all animations and transitions for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
transition-duration: 0.01ms !important;
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
scroll-behavior: auto !important;
}
}
/* ========== My Additions ========== */
/* ---- Accessibility ---- */
/* Text meant only for screen readers */
.visually-hidden {
position: absolute !important;
width: 1px;
height: 1px;
overflow: hidden;
white-space: nowrap;
clip: rect(0 0 0 0);
clip-path: inset(50%);
}
.visually-hidden:hover,
.visually-hidden:active,
.visually-hidden:focus {
display: block;
top: 5px;
left: 5px;
z-index: 100000; /* Above WP toolbar */
width: auto;
height: auto;
padding: 15px 23px 14px;
border-radius: 3px;
box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
background-color: #f1f1f1;
font-size: 14px;
font-weight: bold;
line-height: normal;
text-decoration: none;
color: #21759b;
clip: auto !important;
}
/* Skip to main content */
.skip-link {
position: absolute;
display: inline-block;
top: 1rem;
left: 1rem;
padding: 0.7rem 1rem 0.5rem 1rem;
background-color: white;
font-weight: 700;
text-decoration: none;
text-transform: uppercase;
color: black;
outline: 3px dotted white;
}
.skip-link:hover {
background: black;
color: white;
}
.skip-link:not(:focus) {
position: absolute;
width: 1px;
height: auto;
padding: 0;
border: 0;
overflow: hidden;
margin: 0;
clip: rect(0 0 0 0);
white-space: nowrap;
}
/* Remove necessary focus style as main is the :target */
main:focus {
outline: none;
}