1
+ * ,
2
+ * ::before ,
3
+ * ::after {
4
+ box-sizing : border-box;
5
+ }
6
+
1
7
html {
2
8
font-size : 16px ;
3
9
scroll-behavior : smooth;
@@ -14,12 +20,14 @@ body {
14
20
15
21
a : link ,
16
22
a : visited {
17
- color : # 5a5a5a ;
18
- text-decoration : underline ;
23
+ color : # 3f3ccb ;
24
+ text-decoration : none ;
19
25
}
20
26
21
- a : hover {
22
- text-decoration : none;
27
+ a : hover ,
28
+ a : focus {
29
+ color : # 302683 ;
30
+ text-decoration : underline;
23
31
}
24
32
25
33
h1 ,
49
57
50
58
h3 {
51
59
font-size : 1.75rem ;
52
- scroll-margin-top : 60 px ;
60
+ scroll-margin-top : 20 px ;
53
61
}
54
62
55
63
code ,
@@ -155,12 +163,62 @@ header a:visited {
155
163
height : 300px ;
156
164
}
157
165
158
- .chapter h2 {
166
+ .guide-content {
167
+ display : flex;
168
+ flex-wrap : wrap;
169
+ }
170
+
171
+ .sidebar {
172
+ display : flex;
173
+ flex-direction : column;
174
+
175
+ width : 100% ;
176
+ }
177
+
178
+ .sidebar a {
179
+ display : block;
180
+ color : # 5a5a5a ;
181
+ }
182
+
183
+ .sidebar a : hover {
184
+ color : # 3f3ccb ;
185
+ }
186
+
187
+ .sidebar-col {
159
188
padding : 2rem 1rem ;
189
+ }
190
+
191
+ .sidebar-col + .sidebar-col {
192
+ border-top : 1px solid # e5e5e5 ;
193
+ }
194
+
195
+ .sidebar-col > a {
196
+ font-size : 1.75rem ;
197
+ line-height : 1.25 ;
198
+ }
160
199
200
+ .sidebar-menu {
201
+ padding-left : 1rem ;
202
+ }
203
+
204
+ .chapters {
205
+ width : 100% ;
206
+ }
207
+
208
+ .chapter h2 {
209
+ padding : 2rem 1rem ;
210
+ word-break : break-word;
161
211
background-color : # e5e5e5 ;
162
212
}
163
213
214
+ .chapter h3 [id ]::before {
215
+ display : block;
216
+ height : 2rem ;
217
+ margin-top : -2rem ;
218
+ visibility : hidden;
219
+ content : "" ;
220
+ }
221
+
164
222
.chapter-part {
165
223
display : flex;
166
224
flex-direction : column;
@@ -275,6 +333,22 @@ footer {
275
333
}
276
334
277
335
@media (min-width : 48em ) {
336
+ .sidebar {
337
+ flex-direction : row;
338
+ flex-wrap : wrap;
339
+
340
+ padding : 2rem 0 ;
341
+ }
342
+
343
+ .sidebar-col {
344
+ width : 50% ;
345
+ padding : 1rem 3rem ;
346
+ }
347
+
348
+ .sidebar-col + .sidebar-col {
349
+ border-top : 0 ;
350
+ }
351
+
278
352
.chapter h2 {
279
353
padding : 2rem 3rem 2.5rem ;
280
354
}
@@ -285,7 +359,7 @@ footer {
285
359
286
360
.chapter-part-col {
287
361
width : 50% ;
288
- padding : 3rem ;
362
+ padding : 3rem 1.5 rem ;
289
363
}
290
364
291
365
.chapter-part-col--full-width {
@@ -297,6 +371,77 @@ footer {
297
371
}
298
372
}
299
373
374
+ @media (min-width : 75em ) {
375
+ .chapters {
376
+ width : calc (100% - 230px );
377
+ }
378
+
379
+ .sidebar {
380
+ position : sticky;
381
+ top : 0 ;
382
+ bottom : 0 ;
383
+
384
+ flex-direction : column;
385
+ flex-wrap : nowrap;
386
+ align-self : flex-start;
387
+
388
+ width : 230px ;
389
+ height : 100vh ;
390
+ padding : 0 1rem ;
391
+
392
+ overflow-y : auto;
393
+ line-height : 1.25 ;
394
+ border-right : 1px solid # e5e5e5 ;
395
+ }
396
+
397
+ .sidebar-col {
398
+ flex-shrink : 0 ;
399
+
400
+ width : 100% ;
401
+ padding : 0 ;
402
+ }
403
+
404
+ .sidebar-col-first {
405
+ padding-top : 1.75rem ;
406
+ }
407
+
408
+ .sidebar-col-last {
409
+ padding-bottom : 1.75rem ;
410
+ }
411
+
412
+ .sidebar-col + .sidebar-col {
413
+ margin-top : 1.75em ;
414
+ }
415
+
416
+ .sidebar-col > a {
417
+ display : block;
418
+
419
+ font-size : 0.8rem ;
420
+ font-weight : bold;
421
+ }
422
+
423
+ .sidebar-menu {
424
+ padding : 0 ;
425
+ margin : 0.5em 0 0 ;
426
+
427
+ list-style : none;
428
+
429
+ font-size : 0.7rem ;
430
+ }
431
+
432
+ .sidebar-menu li {
433
+ margin : 0 ;
434
+
435
+ line-height : 1.45 ;
436
+ }
437
+
438
+ .sidebar-menu a {
439
+ display : block;
440
+
441
+ padding : 0.25em 0 ;
442
+ }
443
+ }
444
+
300
445
/* override default prism theme */
301
446
code [class *= "language-" ],
302
447
pre [class *= "language-" ] {
0 commit comments