-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
411 lines (346 loc) · 8.93 KB
/
style.css
File metadata and controls
411 lines (346 loc) · 8.93 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
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
/*
~~~~~~~~~~~~~~~~~~
~~~ CSS RESETS ~~~
~~~~~~~~~~~~~~~~~~
Last updated: 6/21/2025
Sources:
- https://blog.logrocket.com/what-should-modern-css-boilerplate-look-like/
- https://css-tricks.com/box-sizing/
*/
@charset "UTF-8";
/* Set current and legacy box model type. */
html {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
/* Pseudo elements inherit their parent's box model. */
*,
*:before,
*:after {
-webkit-box-sizing: inherit;
-moz-box-sizing: inherit;
box-sizing: inherit;
}
/* Manage UI affordance differently by removing all border defaults . */
* {
border: none;
}
/* Clear default browser padding and margin. */
html,
html * {
padding: 0;
margin: 0;
}
/* Prevents images from blowing up their containers for absolutely no reason at all. Why? Because containers should contain! */
img,
picture {
display: block;
max-width: 100%;
}
/* --- Reset (most) lists ---
Whether you’re using ordered lists (ol), unordered lists (ul), or menus (<menu>), it’s unlikely that you’ll want the list markers (i.e., bullets, numbers, etc.,) that come with them since they look rather unsightly on user interfaces. The following snippet removes them, but not from those used in articles where it makes sense to use them in their natural form: */
menu:not(article menu),
ol:not(article ol),
ul:not(article ul) {
list-style: none;
}
/* TIP: Add the role="list" attribute-value to all lists that you’d like screen readers to announce as such, because list-style: none; disables this ability in some web browsers. */
/* Remove lists' default padding-left: */
menu,
ol,
ul {
padding-left: 0;
}
/* Additionally, since list markers appear on the outside of lists, removing the padding using the snippet above can cause the list markers (the ones used in articles that we’re not resetting) to overlap neighboring content or overflow the viewport, so you’ll want to switch them to the inside instead: */
article ol,
article ul {
list-style-position: inside;
}
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~ ENHANCE LINK UNDERLINES ~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
a {
/* text-decoration: none; Uncomment to remove underlines */
text-underline-position: under; /* Places underlines below the descenders */
text-decoration-thickness: 8; /* Sets the thickness as a percentage of the font size */
}
/* Remove underline from footnotes */
sub a,
sup a,
.footnote li a {
text-decoration: none;
}
/* Disable the text inflation algorithm */
html {
-webkit-text-size-adjust: none; /* for iOS Safari */
text-size-adjust: none; /* for other mobile browsers */
}
/* Instead of instantly snapping to same-page anchors and text fragments, scroll-behavior: smooth; enables users to scroll to them smoothly. Also, to cater to those that prefer reduced motion for accessibility reasons, the rule is wrapped in a prefers-reduced-motion: no-preference media query. */
@media (prefers-reduced-motion: no-preference) {
html {
scroll-behavior: smooth;
}
}
/* We set :focus styles globally by modifying how the outline looks. This means that any element that can receive focus, such as <a> and <button> will have a consistent focus style. The outline-offset pulls the outline away from the content a bit, which in my opinion, makes it more user-friendly. */
:focus {
outline: 1px dotted currentColor;
outline-offset: 0.2rem;
}
/* REMOVE FOCUS OUTLINE FOR MOUSE USERS but keep it for keyboard users. */
:focus:not(:focus-visible) {
outline: none;
}
/* ADD POINTER CURSOR to interactive elements that don’t already have an alternative cursor. */
label,
button,
select,
summary,
[type="radio"],
[type="submit"],
[type="checkbox"] {
cursor: pointer;
}
/*
~~~~~~~~~~~~~~~~~~~~~
~~~ GLOBAL STYLES ~~~
~~~~~~~~~~~~~~~~~~~~~ */
/*
~~~~~~~~~~~~~
~~~ Colors ~~
~~~~~~~~~~~~~ */
:root {
--color-light: #ffffff;
--color-light-shade: #eeeeee;
--color-dark: #231f20;
--color-primary: dodgerblue;
--color-primary-shade: rgb(24, 103, 182);
--color-highlight: dodgerblue;
}
/*
~~~~~~~~~~~~~
~~~ Fonts ~~~
~~~~~~~~~~~~~ */
:root {
/* If you prefer using rem units (which are better for accessibility), 1rem is equal to 16px (the default root font size). It’s much easier to convert px to rem when 1rem is equal to 10px (font-size: 62.5%), but this can break third-party packages and user browser plugins.
Instead, create a font design system by declaring variables with a memorable naming convention and call those variables (e.g., font-size: var(--font-size-md);). */
--font-size-xs: 0.5rem;
--font-size-sm: 0.75rem;
--font-size-md: 1rem;
--font-size-lg: 1.25rem;
--font-size-xl: 1.5rem;
--font-size-2xl: 1.75rem;
--font-size-2-5xl: 2rem;
--font-size-3xl: 2.5rem;
--font-size-4xl: 3rem;
/* Project-specific fonts */
--font-sans: "Roboto", "Segoe UI", "Hind", "Helvetica Neue", Helvetica, Arial,
sans-serif;
--font-code: "Source Code Pro", monospace;
--font-serif: "Source Serif 4", "Times New Roman", serif;
--font-headings: "Space Grotesk", "Helvetica Neue", Helvetica, Arial,
sans-serif;
--font-body: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~ HTML Semantic Elements ~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* ~~ Set Default Fonts ~~ */
html {
font-family: var(--font-sans);
}
body {
font-weight: 400;
}
/* ~~ Headings ~~ */
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: var(--font-headings);
color: var(--color-dark);
margin-bottom: 0.5rem;
}
h1 {
font-size: var(--font-size-4xl);
font-weight: 300;
}
h2 {
font-size: var(--font-size-3xl);
font-weight: 500;
margin-bottom: 0.75rem;
}
h3 {
font-size: var(--font-size-2xl);
font-weight: 500;
margin-bottom: 0.5rem;
}
h4 {
font-size: var(--font-size-xl);
font-weight: 500;
margin-bottom: 0.5rem;
}
h5 {
font-size: var(--font-size-lg);
font-weight: 400;
margin-bottom: 2rem;
}
h6 {
font-size: var(--font-size-md);
font-weight: 300;
margin-bottom: 2rem;
}
/* ~~ Paragraphs and Lists ~~ */
p,
ul,
ol {
font-family: var(--font-body);
font-size: var(--font-size-md);
line-height: 1.6;
margin-bottom: 1em;
}
/* ~~ List Items ~~ */
li {
font-family: var(--font-sans);
}
/* ~~ Code Blocks & Preformatted Text ~~ */
code {
font-family: var(--font-code);
background-color: #f7f7f7;
}
code {
padding: 0;
padding-top: 0.2em;
padding-bottom: 0.2em;
margin: 0;
font-size: 85%;
border-radius: 3px;
}
code:before,
code:after {
letter-spacing: -0.2em;
content: "\00a0";
}
pre > code {
padding: 0;
margin: 0;
font-size: 100%;
word-break: normal;
white-space: pre;
background: transparent;
border: 0;
}
pre {
padding: 1rem;
overflow: auto;
font-size: 85%;
line-height: 1.45;
border-radius: 3px;
background-color: #f7f7f7;
margin-bottom: 1rem;
word-break: normal;
word-wrap: normal;
}
pre code {
display: inline;
max-width: initial;
padding: 0;
margin: 0;
overflow: initial;
line-height: inherit;
word-wrap: normal;
background-color: transparent;
border: 0;
}
pre code:before,
pre code:after {
content: normal;
}
/* ~~ Horizontal Rule ~~ */
hr {
border: 0;
clear: both;
display: block;
width: 96%;
background-color: black;
height: 2px;
margin: 1.75em 0;
}
/* ~~ Hyperlinks ~~ */
a {
color: currentColor;
font-weight: 600;
}
a:hover {
color: var(--color-highlight);
}
header nav a::after {
content: "";
width: 100%;
opacity: 0;
height: 2px;
display: block;
background: currentColor;
}
header nav a:hover::after {
background-color: var(--color-highlight);
opacity: 1;
}
/* ~~ Highlighted and Selected Text ~~ */
mark.highlight {
color: var(--color-light);
background-color: var(--color-highlight);
font-style: normal;
}
::selection {
color: var(--color-light);
background-color: var(--color-highlight);
}
mark.highlight::selection {
background-color: var(--color-dark);
}
/* ~~ Blockquotes ~~ */
blockquote {
background: #ddd;
border-left: 10px solid #aaa;
margin: 1.5em 0;
padding: 1em 2em;
font-style: italic;
quotes: "\201C""\201D""\2018""\2019";
}
blockquote:before {
color: #aaa;
font-family: var(--font-headings);
font-style: normal;
content: "\201C";
font-size: 12rem;
line-height: 0.1rem;
margin-right: 0.25em;
vertical-align: -0.5em;
}
blockquote:before {
content: "\201C";
}
blockquote p {
font-family: var(--font-serif);
font-size: var(--font-size-lg);
}
/* ~~ Tables ~~ */
table {
/* display: table; */
border-collapse: collapse;
border-spacing: 0;
margin-bottom: 1rem;
}
td,
th {
padding: 0;
}
tr,
td {
border: 0;
}