-
Notifications
You must be signed in to change notification settings - Fork 1k
Expand file tree
/
Copy pathstyles.css
More file actions
201 lines (178 loc) · 3.59 KB
/
styles.css
File metadata and controls
201 lines (178 loc) · 3.59 KB
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
/* Code written by Jessica Barnett */
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
/* ----- ROOT STYLES AND VARIABLES ----- */
:root{
--teal: #036f8c;
--pink: #f2af98;
--dark-gray: #222;
--fonts: Arial, Verdana, sans-serif;
font-size: 16px;
}
/* ----- BODY STYLES ----- */
body{
box-sizing: border-box;
line-height: 1.35;
font-family: var(--fonts);
color: var(--dark-gray);
}
/* ----- SKIP LINK STYLES ----- */
#skip{
position: absolute;
left: -10000px;
top: auto;
width: 1px;
height: 1px;
overflow: hidden;
}
#skip:focus{
position: static;
width: auto;
height: auto;
}
/* ----- HEADER STYLES ----- */
header{
padding: 1rem;
border-bottom: 0.25rem solid var(--pink);
}
/* ----- HEADING STYLES ----- */
h1, h2{
font-weight: bold;
text-align: center;
margin: 1rem 0;
}
h1{
font-size: 2rem;
}
h2{
font-size: 1.5rem;
}
/* this code hides text headings that aren't needed visually so that they are only accessible for screen readers */
/* code from: https://webaim.org/techniques/css/invisiblecontent/#:~:text=Absolutely%20positioning%20content%20off%2Dscreen&text=Sighted%20users%20will%20not%20see,screen%20readers%20will%20read%20it. */
.sr-only {
position: absolute;
left: -10000px;
top: auto;
width: 1px;
height: 1px;
overflow: hidden;
}
/* ----- NAV LINK STYLES ----- */
nav a{
display: block;
padding: 1rem;
text-decoration: none;
text-align: center;
background-color: var(--teal);
color: white;
font-weight: bold;
margin: 0.5rem auto;
border-radius: 0.5rem;
width: calc(100% - 2rem);
max-width: 350px;
}
/* ----- MAIN SECTiON STYLES ----- */
main section{
padding: 1rem;
width: calc(100% - 2rem);
max-width: 1000px;
margin: 0 auto;
}
/* ----- IMAGE STYLES ----- */
img{
display: block;
width: 100%;
}
/* ----- TEXT STYLES ----- */
p{
width: 100%;
max-width: 65ch;
margin: 1rem auto;
}
/* ----- FOOTER STYLES ----- */
footer{
padding: 1rem;
border-top: 0.25rem solid var(--pink);
}
footer section{
display: grid;
grid-template-columns: 1fr 1fr 1fr;
gap: 0.5rem;
justify-items: center;
width: 100%;
max-width: 300px;
margin: 0 auto;
}
footer svg{
display: block;
fill: var(--teal);
height: 3rem;
}
/* ----- HOVER STYLES ----- */
@media(hover:hover){
nav a:hover{
background-color: var(--pink);
color: var(--dark-gray);
}
footer a:hover > svg{
fill: var(--pink);
}
}
/* ----- TABLET SCREEN WIDTHS ----- */
@media screen and (min-width: 500px){
/* ----- NAV STYLES ----- */
nav{
max-width: 1200px;
margin: 0 auto;
}
nav ul{
display: grid;
grid-template-columns: 1fr 1fr 1fr;
gap: 1rem;
}
}