-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathoverrides.css
More file actions
403 lines (336 loc) · 8.38 KB
/
overrides.css
File metadata and controls
403 lines (336 loc) · 8.38 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
/* This overrides the default theme, so we can use it instead of editing the theme css */
:root {
font-size: 100% !important;
accent-color: var(--color-primary);
}
:target {
scroll-margin-top: calc(var(--header-height) + 20px);
}
/* logo */
#logo {
display: block;
letter-spacing: -0.1rem;
font-size: 3em;
font-weight: 300;
line-height: 1;
padding-bottom: 56px;
}
#logo,
#logo:hover,
#logo:visited,
#logo:hover:visited {
color: var(--sidebar-fg);
text-decoration: none;
}
body {
font-size: 18px;
font-family: "Poppins", sans-serif;
}
.sidebar-resizing #body-container {
transition: none !important;
}
/* GRID & Layout */
#body-container {
min-height: 100vh;
display: grid;
grid:
[row1-start] "header header header header" auto [row1-end]
[row2-start] "sidebar sidebar-resize menu-bar content" 1fr [row2-end]
[row3-start] "footer footer footer footer" auto [row3-end]
/ 0 0 auto 1fr;
}
.no-js #body-container {
display: grid;
grid:
[row1-start] "header header header" auto [row1-end]
[row2-start] "sidebar sidebar-resize menu-bar content" auto [row2-end]
[row3-start] "footer footer footer" auto [row3-end]
/ 0 0 auto 1fr;
}
#header {
grid-area: header;
}
#sidebar {
grid-area: sidebar;
}
#sidebar-resize-handle {
grid-area: sidebar-resize;
}
#content {
grid-area: content;
}
#footer {
grid-area: footer;
}
#menu-bar-mod {
grid-area: menu-bar;
}
/* sidebar-visible */
#sidebar-toggle-anchor:checked ~ #body-container {
/* On Mobile, max the width of the sidebar, but always leave room for the menu button */
grid-template-columns: var(--sidebar-width-mobile) 0 auto minmax(300px, 1fr);
}
/* Desktop sidebar visible */
@media only screen and (min-width: 620px) {
#sidebar-toggle-anchor:checked ~ #body-container {
grid-template-columns:
var(--sidebar-width) 6px auto
minmax(300px, 1fr);
}
}
::-webkit-scrollbar {
background: var(--bg);
}
::-webkit-scrollbar-thumb {
background: var(--scrollbar);
}
/* Hide extra things */
.menu-title,
.nav-wide-wrapper,
.right-buttons,
#menu-bar-hover-placeholder {
display: none;
}
/* Sidebar Overrides */
#sidebar {
position: relative;
width: auto;
background: var(--sidebar-bg);
}
/* No-JS Sidebar */
body#sidebar {
width: 100%;
}
.sidebar-iframe-outer {
position: relative;
width: 100%;
height: 100vh;
}
.sidebar-iframe-inner {
font-size: inherit;
}
.sidebar-iframe-inner .chapter li:not(.expanded) + li > ol {
display: flex;
flex-direction: column;
}
.sidebar-iframe-inner .chapter li > a.toggle {
transform: rotate(90deg);
}
/* END No-JS Sidebar */
#sidebar::-webkit-scrollbar {
background: var(--sidebar-bg);
}
#sidebar::-webkit-scrollbar-thumb {
background: var(--scrollbar);
}
#sidebar .sidebar-scrollbox {
display: block;
position: sticky;
top: 10px;
box-sizing: padding-box;
padding: 0;
max-height: 100vh;
overflow-x: hidden;
-webkit-overflow-scrolling: touch;
overscroll-behavior-y: contain;
}
#sidebar .sidebar-contents {
padding: 20px 20px 40px 20px;
}
.chapter {
line-height: 1;
}
.chapter li.chapter-item {
margin-block-start: 1em;
}
/* Switch to Chevron */
.chapter li > a.toggle {
background-color: var(--sidebar-fg);
mask: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="chevron"><polyline points="9 18 15 12 9 6"></polyline></svg>');
mask-repeat: repeat;
background-repeat: no-repeat;
mask-repeat: no-repeat;
opacity: 1;
flex: 0 0 24px;
width: 24px;
height: 24px;
padding: 0px;
}
.chapter li:hover > a.toggle,
.chapter a.active + a.toggle {
background-color: var(--sidebar-active);
}
.chapter li > a.toggle div {
display: none;
}
.chapter li > a.toggle {
transition: transform 0.5s;
}
.chapter li.expanded > a.toggle {
transform: rotate(90deg);
}
/* End Switch to Chevron */
/* Resize Handle */
.sidebar-resize-handle {
cursor: col-resize;
display: flex;
align-items: start;
margin-left: var(--sidebar-resize-indicator-space);
width: var(--sidebar-resize-indicator-width);
}
.sidebar-resize-handle .sidebar-resize-indicator {
display: none;
position: fixed;
transform: translateY(50vh);
width: var(--sidebar-resize-indicator-width);
height: 12px;
background-color: var(--icons);
margin-inline-start: 0;
}
.sidebar-resize-handle .sidebar-resize-indicator::after,
.sidebar-resize-handle .sidebar-resize-indicator::before {
border-left: none !important;
}
@media only screen and (min-width: 620px) {
.sidebar-resize-handle .sidebar-resize-indicator {
display: inherit;
}
}
/* Menu Bar overrides */
#menu-bar-mod {
position: relative;
background-color: var(--bg);
}
#menu-bar-mod .left-buttons {
position: sticky;
top: var(--header-height);
display: flex;
align-items: flex-start;
flex-direction: column;
margin: 0;
}
#menu-bar-mod .icon-button {
display: flex;
align-items: center;
justify-items: center;
position: relative;
padding: 0 8px;
width: 50px;
height: 50px;
z-index: 10;
line-height: var(--menu-bar-height);
cursor: pointer;
transition: color 0.5s;
}
#menu-bar-mod #theme-list {
top: 60px;
left: 36px;
color: var(--theme-popup-fg);
}
#page-wrapper {
margin-inline-start: 0 !important;
}
#page-wrapper .page {
padding: 0;
margin-block-start: 0;
}
#content {
overflow-y: auto;
min-height: 100vh;
padding: 32px 45px 128px 6px;
}
#content .nav-wrapper {
padding: 24px;
display: block;
}
#content .mobile-nav-chapters {
display: block;
font-size: 1em;
font-weight: 700;
text-align: center;
text-decoration: none;
padding: 10px 20px;
border-radius: 9999px;
background-color: var(--button-nav-bg);
color: var(--button-nav-fg);
transition: none;
margin-bottom: 24px;
width: auto;
}
#content .mobile-nav-chapters:hover {
color: var(--button-nav-hover-fg);
background: var(--button-nav-hover-bg);
text-decoration: none;
}
#content .mobile-nav-chapters:active {
color: var(--button-nav-hover-fg);
background: var(--button-nav-hover-bg);
}
/* General content related overrides */
mark {
color: var(--fg);
}
h1:target::before {
display: none;
margin-inline-start: 0;
}
h2:target::before,
h3:target::before {
display: inline-block;
content: "#";
width: 50px;
position: relative;
color: var(--headers);
margin-inline-start: 0;
}
h4:target::before,
h5:target::before,
h6:target::before {
display: inline-block;
content: "#";
width: 40px;
position: relative;
color: var(--headers);
margin-inline-start: 0;
}
/* Override some colors */
.content .header:link,
.content .header:visited,
.content .header:hover,
.content .header:visited:hover {
color: var(--headers);
}
#mdbook-help-popup kbd {
color: var(--bg);
background-color: var(--fg);
}
.warning {
padding-left: 30px;
}
.warning:before {
margin-inline-start: calc(-1.5rem - 30px);
}
/* Table settings */
table thead {
background: var(--table-header-bg);
color: var(--table-header-fg);
}
table thead th {
border: 1px var(--table-header-fg) solid;
}
/* Alternate background colors for rows */
table tbody tr:nth-child(2n) {
background: var(--table-alternate-bg);
color: var(--table-alternate-fg);
}
/* Replace Font-Awesome */
.fa.fa-github {
background-color: var(--sidebar-fg);
mask: url("data:image/svg+xml, <svg xmlns='http://www.w3.org/2000/svg' fill='black' viewBox='0 0 98 96'><path d='M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z'/></svg>");
background-repeat: no-repeat;
background-size: contain;
background-position: center center;
height: 1em;
width: 1em;
display: inline-block;
}