File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 22/* Globals */
33
44: root {
5- --sidebar-width : 300px ;
5+ --sidebar-target-width : 300px ;
6+ --sidebar-width : min (var (--sidebar-target-width ), 80vw );
67 --sidebar-resize-indicator-width : 8px ;
78 --sidebar-resize-indicator-space : 2px ;
89 --page-padding : 15px ;
Original file line number Diff line number Diff line change @@ -557,9 +557,9 @@ aria-label="Show hidden lines"></button>';
557557 sidebarToggleAnchor . addEventListener ( 'change' , function sidebarToggle ( ) {
558558 if ( sidebarToggleAnchor . checked ) {
559559 const current_width = parseInt (
560- document . documentElement . style . getPropertyValue ( '--sidebar-width' ) , 10 ) ;
560+ document . documentElement . style . getPropertyValue ( '--sidebar-target- width' ) , 10 ) ;
561561 if ( current_width < 150 ) {
562- document . documentElement . style . setProperty ( '--sidebar-width' , '150px' ) ;
562+ document . documentElement . style . setProperty ( '--sidebar-target- width' , '150px' ) ;
563563 }
564564 showSidebar ( ) ;
565565 } else {
@@ -583,7 +583,7 @@ aria-label="Show hidden lines"></button>';
583583 showSidebar ( ) ;
584584 }
585585 pos = Math . min ( pos , window . innerWidth - 100 ) ;
586- document . documentElement . style . setProperty ( '--sidebar-width' , pos + 'px' ) ;
586+ document . documentElement . style . setProperty ( '--sidebar-target- width' , pos + 'px' ) ;
587587 }
588588 }
589589 //on mouseup remove windows functions mousemove & mouseup
You can’t perform that action at this time.
0 commit comments