1- /* When static files are updated, their suffixes need to be updated.
1+ /*
2+ // ignore-tidy-filelength
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,32 @@ 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 : center;
529+ }
530+
531+ .sidebar-resizer ::after {
532+ content : url ('data:image/svg+xml,\
533+ <svg xmlns= "http://www.w3.org/2000/svg" width="8" height="24" viewBox="0 0 8 24 "> \
534+ <linearGradient id= " x" x1="0" x2="0" y1="0" y2="1"> \
535+ <sto p offset= "0.5" stop-color="%23666"/><stop offset="0.5" stop-color="%23ccc"/> \
536+ </linearGradient> \
537+ <circle r= "2" fill="none" stroke-width="2" stroke="url(%23x )" cy=" 21 " cx=" 3 "/> \
538+ <circle r= " 2 " fill=" none" stroke-width="2" stroke="url(%23x )" cy=" 15 " cx=" 3 "/> \
539+ <circle r= " 2 " fill=" none" stroke-width="2" stroke="url(%23x )" cy=" 9 " cx=" 3 "/> \
540+ <circle r= " 2 " fill=" none" stroke-width="2" stroke="url(%23x )" cy=" 3 " cx=" 3 "/></svg>');
541+ width: 8px;
542+ height: 24px;
543+ filter: var(--sidebar-resizer-img-filter);
544+ }
545+ .sidebar-resizer:hover::after {
546+ filter: var(--sidebar-resizer-img-hover-filter);
524547}
525548
526549.rustdoc.src .sidebar-resizer {
@@ -543,7 +566,7 @@ img {
543566}
544567
545568.sidebar-resizing * {
546- cursor : col -resize !important ;
569+ cursor: ew -resize !important;
547570}
548571
549572.sidebar-resizing .sidebar {
@@ -561,7 +584,7 @@ img {
561584 margin: 0;
562585 /* when active or hovered, place resizer glow on top of the sidebar (right next to, or even
563586 on top of, the scrollbar) */
564- left : var (--desktop-sidebar-width );
587+ left: calc( var(--desktop-sidebar-width) - 1px );
565588 border-left: solid 1px var(--sidebar-resizer-hover);
566589}
567590
@@ -578,6 +601,10 @@ img {
578601 /* too easy to hit the resizer while trying to hit the [-] toggle */
579602 display: none !important;
580603 }
604+ .sidebar {
605+ /* resize indicator: hide this when on touch or mobile */
606+ border-right: none;
607+ }
581608}
582609
583610.sidebar-resizer.active {
@@ -590,6 +617,8 @@ img {
590617}
591618.sidebar-resizer.active::before {
592619 border-left: solid 2px var(--sidebar-resizer-active);
620+ margin-left: 8px;
621+ padding-left: 1px;
593622 display: block;
594623 height: 100%;
595624 content: " ";
@@ -2509,6 +2538,8 @@ in src-script.js and main.js
25092538 /* Reduce height slightly to account for mobile topbar. */
25102539 height : calc (100vh - 45px );
25112540 width : 200px ;
2541+ /* resize indicator: hide this when on touch or mobile */
2542+ border-right : none;
25122543 }
25132544
25142545 /* The source view uses a different design for the sidebar toggle, and doesn't have a topbar,
@@ -2897,6 +2928,7 @@ by default.
28972928 --settings-button-border-focus : # 717171 ;
28982929 --sidebar-background-color : # f5f5f5 ;
28992930 --sidebar-background-color-hover : # e0e0e0 ;
2931+ --sidebar-border-color : # ddd ;
29002932 --code-block-background-color : # f5f5f5 ;
29012933 --scrollbar-track-background-color : # dcdcdc ;
29022934 --scrollbar-thumb-background-color : rgba (36 , 37 , 39 , 0.6 );
@@ -2989,6 +3021,8 @@ by default.
29893021 --scrape-example-code-wrapper-background-end : rgba (255 , 255 , 255 , 0 );
29903022 --sidebar-resizer-hover : hsl (207 , 90% , 66% );
29913023 --sidebar-resizer-active : hsl (207 , 90% , 54% );
3024+ --sidebar-resizer-img-filter : opacity (66% );
3025+ --sidebar-resizer-img-hover-filter : none;
29923026}
29933027/* End theme: light */
29943028
@@ -3002,6 +3036,7 @@ by default.
30023036 --settings-button-border-focus : # ffb900 ;
30033037 --sidebar-background-color : # 505050 ;
30043038 --sidebar-background-color-hover : # 676767 ;
3039+ --sidebar-border-color : # 2A2A2A ;
30053040 --code-block-background-color : # 2A2A2A ;
30063041 --scrollbar-track-background-color : # 717171 ;
30073042 --scrollbar-thumb-background-color : rgba (32 , 34 , 37 , .6 );
@@ -3097,6 +3132,8 @@ by default.
30973132 --scrape-example-code-wrapper-background-end : rgba (53 , 53 , 53 , 0 );
30983133 --sidebar-resizer-hover : hsl (207 , 30% , 54% );
30993134 --sidebar-resizer-active : hsl (207 , 90% , 54% );
3135+ --sidebar-resizer-img-filter : opacity (66% );
3136+ --sidebar-resizer-img-hover-filter : none;
31003137}
31013138/* End theme: dark */
31023139
@@ -3114,6 +3151,7 @@ Original by Dempfi (https://github.com/dempfi/ayu)
31143151 --settings-button-border-focus : # e0e0e0 ;
31153152 --sidebar-background-color : # 14191f ;
31163153 --sidebar-background-color-hover : rgba (70 , 70 , 70 , 0.33 );
3154+ --sidebar-border-color : # 000 ;
31173155 --code-block-background-color : # 191f26 ;
31183156 --scrollbar-track-background-color : transparent;
31193157 --scrollbar-thumb-background-color : # 5c6773 ;
@@ -3209,6 +3247,8 @@ Original by Dempfi (https://github.com/dempfi/ayu)
32093247 --scrape-example-code-wrapper-background-end : rgba (15 , 20 , 25 , 0 );
32103248 --sidebar-resizer-hover : hsl (34 , 50% , 33% );
32113249 --sidebar-resizer-active : hsl (34 , 100% , 66% );
3250+ --sidebar-resizer-img-filter : opacity (66% );
3251+ --sidebar-resizer-img-hover-filter : none;
32123252}
32133253
32143254: root [data-theme = "ayu" ] h1 ,
0 commit comments