1- /* When static files are updated, their suffixes need to be updated.
1+ /* ignore-tidy-filelength */
2+ /*
3+ When static files are updated, their suffixes need to be updated.
24 1. In the top directory run:
35 ./x.py doc --stage 1 library/core
46 2. Find the directory containing files named with updated suffixes:
@@ -496,12 +498,13 @@ img {
496498 top : 0 ;
497499 left : 0 ;
498500 z-index : var (--desktop-sidebar-z-index );
501+ /* resize indicator: hide this when on touch or mobile */
502+ border-right : solid 1px var (--sidebar-border-color );
499503}
500504
501505.rustdoc .src .sidebar {
502506 flex-basis : 50px ;
503507 width : 50px ;
504- border-right : 1px solid;
505508 overflow-x : hidden;
506509 /* The sidebar is by default hidden */
507510 overflow-y : hidden;
@@ -515,12 +518,40 @@ img {
515518.sidebar-resizer {
516519 touch-action : none;
517520 width : 9px ;
518- cursor : col -resize;
521+ cursor : ew -resize;
519522 z-index : calc (var (--desktop-sidebar-z-index ) + 1 );
520523 position : fixed;
521524 height : 100% ;
522- /* make sure there's a 1px gap between the scrollbar and resize handle */
523- left : calc (var (--desktop-sidebar-width ) + 1px );
525+ left : var (--desktop-sidebar-width );
526+ display : flex;
527+ align-items : center;
528+ justify-content : flex-start;
529+ }
530+ .sidebar-resizer ::after {
531+ content : "" ;
532+ background : linear-gradient (
533+ 0.25turn ,
534+ transparent 0px ,
535+ transparent 2px ,
536+ var (--sidebar-border-color ) 2px ,
537+ var (--sidebar-border-color ) 3px ,
538+ var (--sidebar-resizer-shadow ) 3px ,
539+ var (--sidebar-resizer-shadow ) 4px ,
540+ transparent 4px ,
541+ transparent 6px ,
542+ var (--sidebar-border-color ) 6px ,
543+ var (--sidebar-border-color ) 7px ,
544+ var (--sidebar-resizer-shadow ) 7px ,
545+ var (--sidebar-resizer-shadow ) 8px ,
546+ transparent 8px
547+ );
548+ border : solid 1px var (--sidebar-border-color );
549+ border-left : none;
550+ border-right : solid 1px var (--sidebar-resizer-shadow );
551+ border-bottom : solid 1px var (--sidebar-resizer-shadow );
552+ width : 8px ;
553+ height : 24px ;
554+ image-rendering : crisp-edges;
524555}
525556
526557.rustdoc .src .sidebar-resizer {
@@ -543,7 +574,7 @@ img {
543574}
544575
545576.sidebar-resizing * {
546- cursor : col -resize !important ;
577+ cursor : ew -resize !important ;
547578}
548579
549580.sidebar-resizing .sidebar {
@@ -561,7 +592,7 @@ img {
561592 margin : 0 ;
562593 /* when active or hovered, place resizer glow on top of the sidebar (right next to, or even
563594 on top of, the scrollbar) */
564- left : var (--desktop-sidebar-width );
595+ left : calc ( var (--desktop-sidebar-width ) - 1 px );
565596 border-left : solid 1px var (--sidebar-resizer-hover );
566597}
567598
@@ -578,6 +609,10 @@ img {
578609 /* too easy to hit the resizer while trying to hit the [-] toggle */
579610 display : none !important ;
580611 }
612+ .sidebar {
613+ /* resize indicator: hide this when on touch or mobile */
614+ border-right : none;
615+ }
581616}
582617
583618.sidebar-resizer .active {
@@ -2509,6 +2544,8 @@ in src-script.js and main.js
25092544 /* Reduce height slightly to account for mobile topbar. */
25102545 height : calc (100vh - 45px );
25112546 width : 200px ;
2547+ /* resize indicator: hide this when on touch or mobile */
2548+ border-right : none;
25122549 }
25132550
25142551 /* The source view uses a different design for the sidebar toggle, and doesn't have a topbar,
@@ -2897,6 +2934,7 @@ by default.
28972934 --settings-button-border-focus : # 717171 ;
28982935 --sidebar-background-color : # f5f5f5 ;
28992936 --sidebar-background-color-hover : # e0e0e0 ;
2937+ --sidebar-border-color : # ddd ;
29002938 --code-block-background-color : # f5f5f5 ;
29012939 --scrollbar-track-background-color : # dcdcdc ;
29022940 --scrollbar-thumb-background-color : rgba (36 , 37 , 39 , 0.6 );
@@ -2989,6 +3027,7 @@ by default.
29893027 --scrape-example-code-wrapper-background-end : rgba (255 , 255 , 255 , 0 );
29903028 --sidebar-resizer-hover : hsl (207 , 90% , 66% );
29913029 --sidebar-resizer-active : hsl (207 , 90% , 54% );
3030+ --sidebar-resizer-shadow : # ccc ;
29923031}
29933032/* End theme: light */
29943033
@@ -3002,6 +3041,7 @@ by default.
30023041 --settings-button-border-focus : # ffb900 ;
30033042 --sidebar-background-color : # 505050 ;
30043043 --sidebar-background-color-hover : # 676767 ;
3044+ --sidebar-border-color : # 999 ;
30053045 --code-block-background-color : # 2A2A2A ;
30063046 --scrollbar-track-background-color : # 717171 ;
30073047 --scrollbar-thumb-background-color : rgba (32 , 34 , 37 , .6 );
@@ -3097,6 +3137,7 @@ by default.
30973137 --scrape-example-code-wrapper-background-end : rgba (53 , 53 , 53 , 0 );
30983138 --sidebar-resizer-hover : hsl (207 , 30% , 54% );
30993139 --sidebar-resizer-active : hsl (207 , 90% , 54% );
3140+ --sidebar-resizer-shadow : # 000 ;
31003141}
31013142/* End theme: dark */
31023143
@@ -3114,6 +3155,7 @@ Original by Dempfi (https://github.com/dempfi/ayu)
31143155 --settings-button-border-focus : # e0e0e0 ;
31153156 --sidebar-background-color : # 14191f ;
31163157 --sidebar-background-color-hover : rgba (70 , 70 , 70 , 0.33 );
3158+ --sidebar-border-color : # 5c6773 ;
31173159 --code-block-background-color : # 191f26 ;
31183160 --scrollbar-track-background-color : transparent;
31193161 --scrollbar-thumb-background-color : # 5c6773 ;
@@ -3209,6 +3251,7 @@ Original by Dempfi (https://github.com/dempfi/ayu)
32093251 --scrape-example-code-wrapper-background-end : rgba (15 , 20 , 25 , 0 );
32103252 --sidebar-resizer-hover : hsl (34 , 50% , 33% );
32113253 --sidebar-resizer-active : hsl (34 , 100% , 66% );
3254+ --sidebar-resizer-shadow : # 000 ;
32123255}
32133256
32143257: root [data-theme = "ayu" ] h1 ,
0 commit comments