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:
@@ -496,12 +498,13 @@ img {
496
498
top : 0 ;
497
499
left : 0 ;
498
500
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 );
499
503
}
500
504
501
505
.rustdoc .src .sidebar {
502
506
flex-basis : 50px ;
503
507
width : 50px ;
504
- border-right : 1px solid;
505
508
overflow-x : hidden;
506
509
/* The sidebar is by default hidden */
507
510
overflow-y : hidden;
@@ -515,12 +518,32 @@ img {
515
518
.sidebar-resizer {
516
519
touch-action : none;
517
520
width : 9px ;
518
- cursor : col -resize;
521
+ cursor : ew -resize;
519
522
z-index : calc (var (--desktop-sidebar-z-index ) + 1 );
520
523
position : fixed;
521
524
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);
524
547
}
525
548
526
549
.rustdoc.src .sidebar-resizer {
@@ -543,7 +566,7 @@ img {
543
566
}
544
567
545
568
.sidebar-resizing * {
546
- cursor : col -resize !important ;
569
+ cursor: ew -resize !important;
547
570
}
548
571
549
572
.sidebar-resizing .sidebar {
@@ -561,7 +584,7 @@ img {
561
584
margin: 0;
562
585
/* when active or hovered, place resizer glow on top of the sidebar (right next to, or even
563
586
on top of, the scrollbar) */
564
- left : var (--desktop-sidebar-width );
587
+ left: calc( var(--desktop-sidebar-width) - 1px );
565
588
border-left: solid 1px var(--sidebar-resizer-hover);
566
589
}
567
590
@@ -578,6 +601,10 @@ img {
578
601
/* too easy to hit the resizer while trying to hit the [-] toggle */
579
602
display: none !important;
580
603
}
604
+ .sidebar {
605
+ /* resize indicator: hide this when on touch or mobile */
606
+ border-right: none;
607
+ }
581
608
}
582
609
583
610
.sidebar-resizer.active {
@@ -590,6 +617,8 @@ img {
590
617
}
591
618
.sidebar-resizer.active::before {
592
619
border-left: solid 2px var(--sidebar-resizer-active);
620
+ margin-left: 8px;
621
+ padding-left: 1px;
593
622
display: block;
594
623
height: 100%;
595
624
content: " ";
@@ -2509,6 +2538,8 @@ in src-script.js and main.js
2509
2538
/* Reduce height slightly to account for mobile topbar. */
2510
2539
height : calc (100vh - 45px );
2511
2540
width : 200px ;
2541
+ /* resize indicator: hide this when on touch or mobile */
2542
+ border-right : none;
2512
2543
}
2513
2544
2514
2545
/* The source view uses a different design for the sidebar toggle, and doesn't have a topbar,
@@ -2897,6 +2928,7 @@ by default.
2897
2928
--settings-button-border-focus : # 717171 ;
2898
2929
--sidebar-background-color : # f5f5f5 ;
2899
2930
--sidebar-background-color-hover : # e0e0e0 ;
2931
+ --sidebar-border-color : # ddd ;
2900
2932
--code-block-background-color : # f5f5f5 ;
2901
2933
--scrollbar-track-background-color : # dcdcdc ;
2902
2934
--scrollbar-thumb-background-color : rgba (36 , 37 , 39 , 0.6 );
@@ -2989,6 +3021,8 @@ by default.
2989
3021
--scrape-example-code-wrapper-background-end : rgba (255 , 255 , 255 , 0 );
2990
3022
--sidebar-resizer-hover : hsl (207 , 90% , 66% );
2991
3023
--sidebar-resizer-active : hsl (207 , 90% , 54% );
3024
+ --sidebar-resizer-img-filter : opacity (66% );
3025
+ --sidebar-resizer-img-hover-filter : none;
2992
3026
}
2993
3027
/* End theme: light */
2994
3028
@@ -3002,6 +3036,7 @@ by default.
3002
3036
--settings-button-border-focus : # ffb900 ;
3003
3037
--sidebar-background-color : # 505050 ;
3004
3038
--sidebar-background-color-hover : # 676767 ;
3039
+ --sidebar-border-color : # 2A2A2A ;
3005
3040
--code-block-background-color : # 2A2A2A ;
3006
3041
--scrollbar-track-background-color : # 717171 ;
3007
3042
--scrollbar-thumb-background-color : rgba (32 , 34 , 37 , .6 );
@@ -3097,6 +3132,8 @@ by default.
3097
3132
--scrape-example-code-wrapper-background-end : rgba (53 , 53 , 53 , 0 );
3098
3133
--sidebar-resizer-hover : hsl (207 , 30% , 54% );
3099
3134
--sidebar-resizer-active : hsl (207 , 90% , 54% );
3135
+ --sidebar-resizer-img-filter : opacity (66% );
3136
+ --sidebar-resizer-img-hover-filter : none;
3100
3137
}
3101
3138
/* End theme: dark */
3102
3139
@@ -3114,6 +3151,7 @@ Original by Dempfi (https://github.com/dempfi/ayu)
3114
3151
--settings-button-border-focus : # e0e0e0 ;
3115
3152
--sidebar-background-color : # 14191f ;
3116
3153
--sidebar-background-color-hover : rgba (70 , 70 , 70 , 0.33 );
3154
+ --sidebar-border-color : # 000 ;
3117
3155
--code-block-background-color : # 191f26 ;
3118
3156
--scrollbar-track-background-color : transparent;
3119
3157
--scrollbar-thumb-background-color : # 5c6773 ;
@@ -3209,6 +3247,8 @@ Original by Dempfi (https://github.com/dempfi/ayu)
3209
3247
--scrape-example-code-wrapper-background-end : rgba (15 , 20 , 25 , 0 );
3210
3248
--sidebar-resizer-hover : hsl (34 , 50% , 33% );
3211
3249
--sidebar-resizer-active : hsl (34 , 100% , 66% );
3250
+ --sidebar-resizer-img-filter : opacity (66% );
3251
+ --sidebar-resizer-img-hover-filter : none;
3212
3252
}
3213
3253
3214
3254
: root [data-theme = "ayu" ] h1 ,
0 commit comments