@@ -79,6 +79,15 @@ li input[type='checkbox']
7979 vertical-align middle
8080
8181/* navbar */
82+ body .right-sidebar .app-nav
83+ margin 25px 0 0 60px
84+ left 0
85+ right unset
86+
87+ & > ul
88+ padding-inline-start : 0 ;
89+ padding-inline-end : 40px ; // Chrome's default value.
90+
8291.app-nav
8392 margin 25px 60px 0 0
8493 position absolute
@@ -159,6 +168,10 @@ li input[type='checkbox']
159168 display block
160169
161170/* github corner */
171+ body .right-sidebar .github-corner
172+ right unset
173+ transform scaleX (- 1 )
174+
162175.github-corner
163176 border-bottom 0
164177 position fixed
@@ -199,6 +212,11 @@ main.hidden
199212 text-decoration underline
200213
201214/* sidebar */
215+ body .right-sidebar .sidebar
216+ left 100%
217+ border-left 1px solid rgba (0 , 0 , 0 , 0.07 )
218+ border-right none
219+
202220.sidebar
203221 border-right 1px solid rgba (0 , 0 , 0 , 0.07 )
204222 overflow-y auto
@@ -265,6 +283,11 @@ main.hidden
265283 background rgba (136 , 136 , 136 , 0.1 )
266284
267285/* sidebar toggle */
286+ body .right-sidebar .sidebar-toggle
287+ left unset
288+ right 0
289+ transform scaleX (- 1 ) // keeps toggle button on the right
290+
268291.sidebar-toggle
269292 background-color transparent
270293 background-color rgba ($color-bg, 0.8 )
@@ -295,14 +318,18 @@ body.sticky
295318 position fixed
296319
297320/* main content */
321+ body .right-sidebar .content
322+ right $sidebar-width
323+ left 0
324+
298325.content
299326 padding-top 60px
300327 position absolute
301328 top 0
302329 right 0
303330 bottom 0
304331 left $sidebar-width
305- transition left 250ms ease
332+ transition left 250ms ease , right 250 ms ease
306333
307334/* markdown content found on pages */
308335.markdown-section
@@ -391,16 +418,25 @@ body.sticky
391418.markdown-section ul .task-list > li
392419 list-style-type none
393420
394- body .close
395- .sidebar
421+ body
422+ & .close .sidebar
396423 transform translateX (- $sidebar-width )
397424
398- .sidebar-toggle
425+ & .right-sidebar .sidebar
426+ transform translateX (- $sidebar-width )
427+
428+ & .close.right-sidebar .sidebar
429+ transform translateX (0 )
430+
431+ & .close .sidebar-toggle
399432 width auto
400433
401- .content
434+ $.close .content
402435 left 0
403436
437+ & .close.right-sidebar .content
438+ right 0
439+
404440@media print
405441 .github-corner , .sidebar-toggle , .sidebar , .app-nav
406442 display none
@@ -419,6 +455,9 @@ body.close
419455 height auto
420456 overflow-x hidden
421457
458+ body .right-sidebar .sidebar
459+ left 100%
460+
422461 .sidebar
423462 left - $sidebar-width
424463 transition transform 250ms ease-out
@@ -438,21 +477,35 @@ body.close
438477 width auto
439478 padding 30px 30px 10px 10px
440479
441- body .close
442- .sidebar
480+ body
481+ // Note, on mobile .close means open, because mobile starts with the sidebar
482+ // closed (opposite of desktop which starts with sidebar open), and the
483+ // `close` class is toggled by the toggle button.
484+
485+ & .close .sidebar
443486 transform translateX ($sidebar-width )
444487
445- .sidebar-toggle
446- background-color rgba ($color-bg, 0.8 )
447- transition 1s background-color
448- width $sidebar-width - 16px
449- padding 10px
488+ & .right-sidebar .sidebar
489+ transform translateX (0 )
450490
451- .content
452- transform translateX ($sidebar-width )
491+ & .close.right-sidebar .sidebar
492+ transform translateX (- $sidebar-width )
453493
454- .app-nav , .github-corner
455- display none
494+ & .close
495+ .sidebar-toggle
496+ background-color rgba ($color-bg, 0.8 )
497+ transition 1s background-color
498+ width $sidebar-width - 16px
499+ padding 10px
500+
501+ .content
502+ transform translateX ($sidebar-width )
503+
504+ & .right-sidebar .content
505+ transform translateX (- $sidebar-width )
506+
507+ .app-nav , .github-corner
508+ display none
456509
457510 .github-corner
458511 & :hover .octo-arm
0 commit comments