-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.css
More file actions
284 lines (247 loc) · 5.44 KB
/
main.css
File metadata and controls
284 lines (247 loc) · 5.44 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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
/* [href="#main"] {
position: absolute;
top: 0;
right: 100%;
} */
[href="#main"] {
right: auto;
}
html {
font-size: 100%;
}
div.table-of-contents {
border: 3px solid #c8f7c5;
padding-left: 1em;
padding-right: 1em;
margin-top: 0.5em;
width: fit-content;
}
div.table-of-contents li {
margin: 1em 0 1em 0;
}
/* Ideal length width for readability is around 60rem */
main {
max-width: 60rem;
text-align: left;
}
/* Owl selector, basic spacing to use generally, instead of elements directly, to avoid doubling up padding of containers
see: https://alistapart.com/article/axiomatic-css-and-lobotomized-owls/ */
main * + * {
margin-top: 1.5rem;
}
li, dt, dd, br, th, td {
margin-top: 0;
}
* + h2, * + h3 {
margin-top: 1.5em;
}
main * + *:not(p) {
margin: 3rem 0;
}
nav {
display: flex;
justify-content: space-evenly;
background-color: #c8f7c5;
}
img {
display: block;
margin-left: auto;
margin-right: auto;
width: 50vw;
}
img#profile-picture {
width: 20vw;
}
@media screen and (min-width: 200px) and (max-width: 640px) {
/* Make sure to display touch target in an easy way for mobile users - So they can easily touch the button they want withh enough space between buttons */
nav {
display: grid;
grid-template-columns: 1fr 1fr;
}
/* Resize images with mobile layout */
img {
width: 80%;
display: block;
margin-left: auto;
margin-right: auto;
}
}
a.navigation-link {
justify-content: center;
font-size: 2em;
color: #0e3041;
padding: 0.2em;
text-decoration: none;
}
/* When the tab is used (focus), we need to make sure there is a clear indication of focus, visually*/
a.navigation-link:focus {
border: #c8f7c5;
color: #c8f7c5;
text-shadow: none;
display: inline-block;
padding: 0.5rem;
background: #0e3041;
color: 2px solid #c8f7c5;
transform: scale(1.2);
}
a.nagivation-link::after {
position: absolute;
left: 0;
right: 0;
bottom: -0.25em;
height: 0.25em;
background-size: auto 100%;
}
/* Line height needs to be a unitless proportion, so when zoom in and out, ensure proportionate line height */
p {
line-height: 1.5;
}
/* Media queries */
/* We ensure inclusive measure within responsive layout - Here with a larger screen */
@media (min-width: 120rem) {
html {
font-size: 150%;
}
}
/* link underlines - Underline should not intersect the form, it needs to leave the space for readability */
.media-link {
color: #c8f7c5;
text-decoration: none;
text-shadow: 0.05em 0 0#0e3041, -0.05em 0 0 #0e3041,
0 0.05em 0 #0e3041, 0 -0.05em 0 #0e3041,
0.1em 0 0 #0e3041, -0.1em 0 0 #0e3041,
0 0.1em 0 #0e3041, 0 -0.1em 0 #0e3041;
background-position: bottom 0.05em center;
background-repeat: repeat-x;
background-size: 100% 0.05em;
background-image: linear-gradient(to right, currentColor 0%, currentColor 100%);
}
.skip-to-main a {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
font-weight: bold;
font-size: 1.2rem;
}
.skip-to-main a:focus {
position: static;
width: auto;
height: auto;
color: #c8f7c5;
background-color:#0e3041;
color: 2px solid #c8f7c5;
transform: scale(1.2);
text-shadow: none;
margin: 0.8em;
padding: 0.5em;
border: 2px solid #c8f7c5;
}
a {
outline: none;
color: #c8f7c5;
}
a:focus {
outline: none;
background-color: #c8f7c5;
color: #0e3041;
text-shadow: 0.05em 0 0 #c8f7c5, -0.05em 0 0 #c8f7c5,
0 0.05em 0 #c8f7c5, 0 -0.05em 0 #c8f7c5,
0.1em 0 0 #c8f7c5, -0.1em 0 0 #c8f7c5,
0 0.1em 0 #c8f7c5, 0 -0.1em 0 #c8f7c5;
}
/* Subtitle will be visually hidden. give an implicit role of the span, and read for screen readers [subtitle] */
.visually-hidden {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip: rect(1px, 1px, 1px, 1px);
}
#main-contact {
margin: 0 auto;
}
.border-outline {
border: #c8f7c5 2px solid;
margin: 0 auto;
}
main#main.border-outline, form.border-outline {
margin-top: 1em;
}
.about-description {
display: flex;
justify-content: space-around;
align-items: center;
margin-top: 0;
}
.about-details {
max-width: 30rem;
}
h1.page-title, div.page-title {
margin: 0 auto;
margin-top: 2rem;
width: 50%;
}
#contact-form {
grid-template-rows: 1fr 1fr;
width: 50%;
margin: 0 auto;
padding: 0 1em 1em 1em;
}
textarea#message {
height: 5rem;
width: 25rem;
}
.message-label-input {
display: grid;
}
button {
background-color: #c8f7c5;
color: #0e3041;
border: #0e3041 1px solid;
font-size: 1.5rem;
padding: 0.2em 0.5em 0.2em 0.5em;
}
#send-contact-form-btn {
display: grid;
justify-content: center;
align-content: center;
margin: 0 auto;
margin-top: 1rem;
margin-bottom: 2rem;
border-radius: 3px;
}
/* Styling placeholders to help with visualisation */
::placeholder {
color: #000;
font-style: italic;
}
@media screen and (min-width: 200px) and (max-width: 640px) {
/* Make sure to display touch target in an easy way for mobile users - So they can easily touch the button they want withh enough space between buttons */
form {
height: 97vh;
}
h1.contact-title {
font-size: 150%;
height: 2rem;
}
#contact-form {
display: grid;
grid-template-rows: 1fr 1fr;
width: 80%;
height: 20%;
padding-top: 1em;
}
/* Resize images with mobile layout */
textarea#message {
height: 5rem;
width: 90%;
}
div.email-label-input {
width: 100%;
margin: auto;
}
main * + *:not(p) {
margin: 1rem 0;
}
}