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:
@@ -493,12 +495,13 @@ img {
493495 top : 0 ;
494496 left : 0 ;
495497 z-index : var (--desktop-sidebar-z-index );
498+ /* resize indicator: hide this when on touch or mobile */
499+ border-right : solid 1px var (--sidebar-border-color );
496500}
497501
498502.rustdoc .src .sidebar {
499503 flex-basis : 50px ;
500504 width : 50px ;
501- border-right : 1px solid;
502505 overflow-x : hidden;
503506 /* The sidebar is by default hidden */
504507 overflow-y : hidden;
@@ -512,12 +515,32 @@ img {
512515.sidebar-resizer {
513516 touch-action : none;
514517 width : 9px ;
515- cursor : col -resize;
518+ cursor : ew -resize;
516519 z-index : calc (var (--desktop-sidebar-z-index ) + 1 );
517520 position : fixed;
518521 height : 100% ;
519- /* make sure there's a 1px gap between the scrollbar and resize handle */
520- left : calc (var (--desktop-sidebar-width ) + 1px );
522+ left : var (--desktop-sidebar-width );
523+ display : flex;
524+ align-items : center;
525+ justify-content : center;
526+ }
527+
528+ .sidebar-resizer ::after {
529+ content : url ('data:image/svg+xml,\
530+ <svg xmlns= "http://www.w3.org/2000/svg" width="8" height="24" viewBox="0 0 8 24 "> \
531+ <linearGradient id= " x" x1="0" x2="0" y1="0" y2="1"> \
532+ <sto p offset= "0.5" stop-color="%23666"/><stop offset="0.5" stop-color="%23ccc"/> \
533+ </linearGradient> \
534+ <circle r= "2" fill="none" stroke-width="2" stroke="url(%23x )" cy=" 21 " cx=" 3 "/> \
535+ <circle r= " 2 " fill=" none" stroke-width="2" stroke="url(%23x )" cy=" 15 " cx=" 3 "/> \
536+ <circle r= " 2 " fill=" none" stroke-width="2" stroke="url(%23x )" cy=" 9 " cx=" 3 "/> \
537+ <circle r= " 2 " fill=" none" stroke-width="2" stroke="url(%23x )" cy=" 3 " cx=" 3 "/></svg>');
538+ width: 8px;
539+ height: 24px;
540+ filter: var(--sidebar-resizer-img-filter);
541+ }
542+ .sidebar-resizer:hover::after {
543+ filter: var(--sidebar-resizer-img-hover-filter);
521544}
522545
523546.rustdoc.src .sidebar-resizer {
@@ -540,7 +563,7 @@ img {
540563}
541564
542565.sidebar-resizing * {
543- cursor : col -resize !important ;
566+ cursor: ew -resize !important;
544567}
545568
546569.sidebar-resizing .sidebar {
@@ -558,7 +581,7 @@ img {
558581 margin: 0;
559582 /* when active or hovered, place resizer glow on top of the sidebar (right next to, or even
560583 on top of, the scrollbar) */
561- left : var (--desktop-sidebar-width );
584+ left: calc( var(--desktop-sidebar-width) - 1px );
562585 border-left: solid 1px var(--sidebar-resizer-hover);
563586}
564587
@@ -575,6 +598,10 @@ img {
575598 /* too easy to hit the resizer while trying to hit the [-] toggle */
576599 display: none !important;
577600 }
601+ .sidebar {
602+ /* resize indicator: hide this when on touch or mobile */
603+ border-right: none;
604+ }
578605}
579606
580607.sidebar-resizer.active {
@@ -585,8 +612,10 @@ img {
585612 margin-left: -140px;
586613 border-left: none;
587614}
588- .sidebar-resizer .active : before {
615+ .sidebar-resizer.active:: before {
589616 border-left: solid 2px var(--sidebar-resizer-active);
617+ margin-left: 8px;
618+ padding-left: 1px;
590619 display: block;
591620 height: 100%;
592621 content: " ";
@@ -2510,6 +2539,8 @@ in src-script.js and main.js
25102539 /* Reduce height slightly to account for mobile topbar. */
25112540 height : calc (100vh - 45px );
25122541 width : 200px ;
2542+ /* resize indicator: hide this when on touch or mobile */
2543+ border-right : none;
25132544 }
25142545
25152546 /* The source view uses a different design for the sidebar toggle, and doesn't have a topbar,
@@ -2893,6 +2924,7 @@ by default.
28932924 --settings-button-border-focus : # 717171 ;
28942925 --sidebar-background-color : # f5f5f5 ;
28952926 --sidebar-background-color-hover : # e0e0e0 ;
2927+ --sidebar-border-color : # ddd ;
28962928 --code-block-background-color : # f5f5f5 ;
28972929 --scrollbar-track-background-color : # dcdcdc ;
28982930 --scrollbar-thumb-background-color : rgba (36 , 37 , 39 , 0.6 );
@@ -2985,6 +3017,8 @@ by default.
29853017 --scrape-example-code-wrapper-background-end : rgba (255 , 255 , 255 , 0 );
29863018 --sidebar-resizer-hover : hsl (207 , 90% , 66% );
29873019 --sidebar-resizer-active : hsl (207 , 90% , 54% );
3020+ --sidebar-resizer-img-filter : opacity (66% );
3021+ --sidebar-resizer-img-hover-filter : none;
29883022}
29893023/* End theme: light */
29903024
@@ -2998,6 +3032,7 @@ by default.
29983032 --settings-button-border-focus : # ffb900 ;
29993033 --sidebar-background-color : # 505050 ;
30003034 --sidebar-background-color-hover : # 676767 ;
3035+ --sidebar-border-color : # 2A2A2A ;
30013036 --code-block-background-color : # 2A2A2A ;
30023037 --scrollbar-track-background-color : # 717171 ;
30033038 --scrollbar-thumb-background-color : rgba (32 , 34 , 37 , .6 );
@@ -3093,6 +3128,8 @@ by default.
30933128 --scrape-example-code-wrapper-background-end : rgba (53 , 53 , 53 , 0 );
30943129 --sidebar-resizer-hover : hsl (207 , 30% , 54% );
30953130 --sidebar-resizer-active : hsl (207 , 90% , 54% );
3131+ --sidebar-resizer-img-filter : opacity (66% );
3132+ --sidebar-resizer-img-hover-filter : none;
30963133}
30973134/* End theme: dark */
30983135
@@ -3110,6 +3147,7 @@ Original by Dempfi (https://github.com/dempfi/ayu)
31103147 --settings-button-border-focus : # e0e0e0 ;
31113148 --sidebar-background-color : # 14191f ;
31123149 --sidebar-background-color-hover : rgba (70 , 70 , 70 , 0.33 );
3150+ --sidebar-border-color : # 000 ;
31133151 --code-block-background-color : # 191f26 ;
31143152 --scrollbar-track-background-color : transparent;
31153153 --scrollbar-thumb-background-color : # 5c6773 ;
@@ -3205,6 +3243,8 @@ Original by Dempfi (https://github.com/dempfi/ayu)
32053243 --scrape-example-code-wrapper-background-end : rgba (15 , 20 , 25 , 0 );
32063244 --sidebar-resizer-hover : hsl (34 , 50% , 33% );
32073245 --sidebar-resizer-active : hsl (34 , 100% , 66% );
3246+ --sidebar-resizer-img-filter : opacity (66% );
3247+ --sidebar-resizer-img-hover-filter : none;
32083248}
32093249
32103250: root [data-theme = "ayu" ] h1 ,
0 commit comments