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.
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,40 @@ 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 : 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;
524
555
}
525
556
526
557
.rustdoc .src .sidebar-resizer {
@@ -543,7 +574,7 @@ img {
543
574
}
544
575
545
576
.sidebar-resizing * {
546
- cursor : col -resize !important ;
577
+ cursor : ew -resize !important ;
547
578
}
548
579
549
580
.sidebar-resizing .sidebar {
@@ -561,7 +592,7 @@ img {
561
592
margin : 0 ;
562
593
/* when active or hovered, place resizer glow on top of the sidebar (right next to, or even
563
594
on top of, the scrollbar) */
564
- left : var (--desktop-sidebar-width );
595
+ left : calc ( var (--desktop-sidebar-width ) - 1 px );
565
596
border-left : solid 1px var (--sidebar-resizer-hover );
566
597
}
567
598
@@ -578,6 +609,10 @@ img {
578
609
/* too easy to hit the resizer while trying to hit the [-] toggle */
579
610
display : none !important ;
580
611
}
612
+ .sidebar {
613
+ /* resize indicator: hide this when on touch or mobile */
614
+ border-right : none;
615
+ }
581
616
}
582
617
583
618
.sidebar-resizer .active {
@@ -2509,6 +2544,8 @@ in src-script.js and main.js
2509
2544
/* Reduce height slightly to account for mobile topbar. */
2510
2545
height : calc (100vh - 45px );
2511
2546
width : 200px ;
2547
+ /* resize indicator: hide this when on touch or mobile */
2548
+ border-right : none;
2512
2549
}
2513
2550
2514
2551
/* The source view uses a different design for the sidebar toggle, and doesn't have a topbar,
@@ -2897,6 +2934,7 @@ by default.
2897
2934
--settings-button-border-focus : # 717171 ;
2898
2935
--sidebar-background-color : # f5f5f5 ;
2899
2936
--sidebar-background-color-hover : # e0e0e0 ;
2937
+ --sidebar-border-color : # ddd ;
2900
2938
--code-block-background-color : # f5f5f5 ;
2901
2939
--scrollbar-track-background-color : # dcdcdc ;
2902
2940
--scrollbar-thumb-background-color : rgba (36 , 37 , 39 , 0.6 );
@@ -2989,6 +3027,7 @@ by default.
2989
3027
--scrape-example-code-wrapper-background-end : rgba (255 , 255 , 255 , 0 );
2990
3028
--sidebar-resizer-hover : hsl (207 , 90% , 66% );
2991
3029
--sidebar-resizer-active : hsl (207 , 90% , 54% );
3030
+ --sidebar-resizer-shadow : # ccc ;
2992
3031
}
2993
3032
/* End theme: light */
2994
3033
@@ -3002,6 +3041,7 @@ by default.
3002
3041
--settings-button-border-focus : # ffb900 ;
3003
3042
--sidebar-background-color : # 505050 ;
3004
3043
--sidebar-background-color-hover : # 676767 ;
3044
+ --sidebar-border-color : # 999 ;
3005
3045
--code-block-background-color : # 2A2A2A ;
3006
3046
--scrollbar-track-background-color : # 717171 ;
3007
3047
--scrollbar-thumb-background-color : rgba (32 , 34 , 37 , .6 );
@@ -3097,6 +3137,7 @@ by default.
3097
3137
--scrape-example-code-wrapper-background-end : rgba (53 , 53 , 53 , 0 );
3098
3138
--sidebar-resizer-hover : hsl (207 , 30% , 54% );
3099
3139
--sidebar-resizer-active : hsl (207 , 90% , 54% );
3140
+ --sidebar-resizer-shadow : # 000 ;
3100
3141
}
3101
3142
/* End theme: dark */
3102
3143
@@ -3114,6 +3155,7 @@ Original by Dempfi (https://github.com/dempfi/ayu)
3114
3155
--settings-button-border-focus : # e0e0e0 ;
3115
3156
--sidebar-background-color : # 14191f ;
3116
3157
--sidebar-background-color-hover : rgba (70 , 70 , 70 , 0.33 );
3158
+ --sidebar-border-color : # 5c6773 ;
3117
3159
--code-block-background-color : # 191f26 ;
3118
3160
--scrollbar-track-background-color : transparent;
3119
3161
--scrollbar-thumb-background-color : # 5c6773 ;
@@ -3209,6 +3251,7 @@ Original by Dempfi (https://github.com/dempfi/ayu)
3209
3251
--scrape-example-code-wrapper-background-end : rgba (15 , 20 , 25 , 0 );
3210
3252
--sidebar-resizer-hover : hsl (34 , 50% , 33% );
3211
3253
--sidebar-resizer-active : hsl (34 , 100% , 66% );
3254
+ --sidebar-resizer-shadow : # 000 ;
3212
3255
}
3213
3256
3214
3257
: root [data-theme = "ayu" ] h1 ,
0 commit comments