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.
2
4
1. In the top directory run:
3
5
./x.py doc --stage 1 library/core
4
6
2. Find the directory containing files named with updated suffixes:
@@ -493,12 +495,13 @@ img {
493
495
top : 0 ;
494
496
left : 0 ;
495
497
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 );
496
500
}
497
501
498
502
.rustdoc .src .sidebar {
499
503
flex-basis : 50px ;
500
504
width : 50px ;
501
- border-right : 1px solid;
502
505
overflow-x : hidden;
503
506
/* The sidebar is by default hidden */
504
507
overflow-y : hidden;
@@ -516,8 +519,28 @@ img {
516
519
z-index : calc (var (--desktop-sidebar-z-index ) + 1 );
517
520
position : fixed;
518
521
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);
521
544
}
522
545
523
546
.rustdoc.src .sidebar-resizer {
@@ -540,7 +563,7 @@ img {
540
563
}
541
564
542
565
.sidebar-resizing * {
543
- cursor : col -resize !important ;
566
+ cursor: ew -resize !important;
544
567
}
545
568
546
569
.sidebar-resizing .sidebar {
@@ -558,7 +581,7 @@ img {
558
581
margin: 0;
559
582
/* when active or hovered, place resizer glow on top of the sidebar (right next to, or even
560
583
on top of, the scrollbar) */
561
- left : var (--desktop-sidebar-width );
584
+ left: calc( var(--desktop-sidebar-width) - 1px );
562
585
border-left: solid 1px var(--sidebar-resizer-hover);
563
586
}
564
587
@@ -575,6 +598,10 @@ img {
575
598
/* too easy to hit the resizer while trying to hit the [-] toggle */
576
599
display: none !important;
577
600
}
601
+ .sidebar {
602
+ /* resize indicator: hide this when on touch or mobile */
603
+ border-right: none;
604
+ }
578
605
}
579
606
580
607
.sidebar-resizer.active {
@@ -585,8 +612,10 @@ img {
585
612
margin-left: -140px;
586
613
border-left: none;
587
614
}
588
- .sidebar-resizer .active : before {
615
+ .sidebar-resizer.active:: before {
589
616
border-left: solid 2px var(--sidebar-resizer-active);
617
+ margin-left: 8px;
618
+ padding-left: 1px;
590
619
display: block;
591
620
height: 100%;
592
621
content: " ";
@@ -2510,6 +2539,8 @@ in src-script.js and main.js
2510
2539
/* Reduce height slightly to account for mobile topbar. */
2511
2540
height : calc (100vh - 45px );
2512
2541
width : 200px ;
2542
+ /* resize indicator: hide this when on touch or mobile */
2543
+ border-right : none;
2513
2544
}
2514
2545
2515
2546
/* The source view uses a different design for the sidebar toggle, and doesn't have a topbar,
@@ -2893,6 +2924,7 @@ by default.
2893
2924
--settings-button-border-focus : # 717171 ;
2894
2925
--sidebar-background-color : # f5f5f5 ;
2895
2926
--sidebar-background-color-hover : # e0e0e0 ;
2927
+ --sidebar-border-color : # ddd ;
2896
2928
--code-block-background-color : # f5f5f5 ;
2897
2929
--scrollbar-track-background-color : # dcdcdc ;
2898
2930
--scrollbar-thumb-background-color : rgba (36 , 37 , 39 , 0.6 );
@@ -2985,6 +3017,8 @@ by default.
2985
3017
--scrape-example-code-wrapper-background-end : rgba (255 , 255 , 255 , 0 );
2986
3018
--sidebar-resizer-hover : hsl (207 , 90% , 66% );
2987
3019
--sidebar-resizer-active : hsl (207 , 90% , 54% );
3020
+ --sidebar-resizer-img-filter : opacity (66% );
3021
+ --sidebar-resizer-img-hover-filter : none;
2988
3022
}
2989
3023
/* End theme: light */
2990
3024
@@ -2998,6 +3032,7 @@ by default.
2998
3032
--settings-button-border-focus : # ffb900 ;
2999
3033
--sidebar-background-color : # 505050 ;
3000
3034
--sidebar-background-color-hover : # 676767 ;
3035
+ --sidebar-border-color : # 2A2A2A ;
3001
3036
--code-block-background-color : # 2A2A2A ;
3002
3037
--scrollbar-track-background-color : # 717171 ;
3003
3038
--scrollbar-thumb-background-color : rgba (32 , 34 , 37 , .6 );
@@ -3093,6 +3128,8 @@ by default.
3093
3128
--scrape-example-code-wrapper-background-end : rgba (53 , 53 , 53 , 0 );
3094
3129
--sidebar-resizer-hover : hsl (207 , 30% , 54% );
3095
3130
--sidebar-resizer-active : hsl (207 , 90% , 54% );
3131
+ --sidebar-resizer-img-filter : opacity (66% );
3132
+ --sidebar-resizer-img-hover-filter : none;
3096
3133
}
3097
3134
/* End theme: dark */
3098
3135
@@ -3110,6 +3147,7 @@ Original by Dempfi (https://github.com/dempfi/ayu)
3110
3147
--settings-button-border-focus : # e0e0e0 ;
3111
3148
--sidebar-background-color : # 14191f ;
3112
3149
--sidebar-background-color-hover : rgba (70 , 70 , 70 , 0.33 );
3150
+ --sidebar-border-color : # 000 ;
3113
3151
--code-block-background-color : # 191f26 ;
3114
3152
--scrollbar-track-background-color : transparent;
3115
3153
--scrollbar-thumb-background-color : # 5c6773 ;
@@ -3205,6 +3243,8 @@ Original by Dempfi (https://github.com/dempfi/ayu)
3205
3243
--scrape-example-code-wrapper-background-end : rgba (15 , 20 , 25 , 0 );
3206
3244
--sidebar-resizer-hover : hsl (34 , 50% , 33% );
3207
3245
--sidebar-resizer-active : hsl (34 , 100% , 66% );
3246
+ --sidebar-resizer-img-filter : opacity (66% );
3247
+ --sidebar-resizer-img-hover-filter : none;
3208
3248
}
3209
3249
3210
3250
: root [data-theme = "ayu" ] h1 ,
0 commit comments