File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 2
2
/* Globals */
3
3
4
4
: root {
5
- --sidebar-width : 300px ;
5
+ --sidebar-target-width : 300px ;
6
+ --sidebar-width : min (var (--sidebar-target-width ), 80vw );
6
7
--sidebar-resize-indicator-width : 8px ;
7
8
--sidebar-resize-indicator-space : 2px ;
8
9
--page-padding : 15px ;
Original file line number Diff line number Diff line change @@ -557,9 +557,9 @@ aria-label="Show hidden lines"></button>';
557
557
sidebarToggleAnchor . addEventListener ( 'change' , function sidebarToggle ( ) {
558
558
if ( sidebarToggleAnchor . checked ) {
559
559
const current_width = parseInt (
560
- document . documentElement . style . getPropertyValue ( '--sidebar-width' ) , 10 ) ;
560
+ document . documentElement . style . getPropertyValue ( '--sidebar-target- width' ) , 10 ) ;
561
561
if ( current_width < 150 ) {
562
- document . documentElement . style . setProperty ( '--sidebar-width' , '150px' ) ;
562
+ document . documentElement . style . setProperty ( '--sidebar-target- width' , '150px' ) ;
563
563
}
564
564
showSidebar ( ) ;
565
565
} else {
@@ -583,7 +583,7 @@ aria-label="Show hidden lines"></button>';
583
583
showSidebar ( ) ;
584
584
}
585
585
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' ) ;
587
587
}
588
588
}
589
589
//on mouseup remove windows functions mousemove & mouseup
You can’t perform that action at this time.
0 commit comments