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,27 @@ 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
+ color : var (--right-side-color );
530
+ }
531
+ .sidebar-resizer ::before {
532
+ content : "" ;
533
+ border-right : dotted 2px currentColor;
534
+ width : 2px ;
535
+ height : 12px ;
536
+ }
537
+ .sidebar-resizer ::after {
538
+ content : "" ;
539
+ border-right : dotted 2px currentColor;
540
+ width : 2px ;
541
+ height : 16px ;
524
542
}
525
543
526
544
.rustdoc .src .sidebar-resizer {
@@ -543,11 +561,12 @@ img {
543
561
}
544
562
545
563
.sidebar-resizing * {
546
- cursor : col -resize !important ;
564
+ cursor : ew -resize !important ;
547
565
}
548
566
549
567
.sidebar-resizing .sidebar {
550
568
position : fixed;
569
+ border-right : solid 2px var (--sidebar-resizer-active );
551
570
}
552
571
.sidebar-resizing > body {
553
572
padding-left : var (--resizing-sidebar-width );
@@ -561,8 +580,9 @@ img {
561
580
margin : 0 ;
562
581
/* when active or hovered, place resizer glow on top of the sidebar (right next to, or even
563
582
on top of, the scrollbar) */
564
- left : var (--desktop-sidebar-width );
583
+ left : calc ( var (--desktop-sidebar-width ) - 1 px );
565
584
border-left : solid 1px var (--sidebar-resizer-hover );
585
+ color : var (--sidebar-resizer-hover );
566
586
}
567
587
568
588
.src-sidebar-expanded .rustdoc .src .sidebar-resizer : hover ,
@@ -578,21 +598,20 @@ img {
578
598
/* too easy to hit the resizer while trying to hit the [-] toggle */
579
599
display : none !important ;
580
600
}
601
+ .sidebar {
602
+ /* resize indicator: hide this when on touch or mobile */
603
+ border-right : none;
604
+ }
581
605
}
582
606
583
607
.sidebar-resizer .active {
584
608
/* make the resize tool bigger when actually resizing, to avoid :hover styles on other stuff
585
609
while resizing */
586
610
padding : 0 140px ;
587
- width : 2px ;
611
+ width : calc ( 140 px + 140 px + 9 px + 2px ) ;
588
612
margin-left : -140px ;
589
613
border-left : none;
590
- }
591
- .sidebar-resizer .active ::before {
592
- border-left : solid 2px var (--sidebar-resizer-active );
593
- display : block;
594
- height : 100% ;
595
- content : "" ;
614
+ color : var (--sidebar-resizer-active );
596
615
}
597
616
598
617
.sidebar , .mobile-topbar , .sidebar-menu-toggle ,
@@ -2509,6 +2528,8 @@ in src-script.js and main.js
2509
2528
/* Reduce height slightly to account for mobile topbar. */
2510
2529
height : calc (100vh - 45px );
2511
2530
width : 200px ;
2531
+ /* resize indicator: hide this when on touch or mobile */
2532
+ border-right : none;
2512
2533
}
2513
2534
2514
2535
/* The source view uses a different design for the sidebar toggle, and doesn't have a topbar,
@@ -2897,6 +2918,7 @@ by default.
2897
2918
--settings-button-border-focus : # 717171 ;
2898
2919
--sidebar-background-color : # f5f5f5 ;
2899
2920
--sidebar-background-color-hover : # e0e0e0 ;
2921
+ --sidebar-border-color : # ddd ;
2900
2922
--code-block-background-color : # f5f5f5 ;
2901
2923
--scrollbar-track-background-color : # dcdcdc ;
2902
2924
--scrollbar-thumb-background-color : rgba (36 , 37 , 39 , 0.6 );
@@ -3002,6 +3024,7 @@ by default.
3002
3024
--settings-button-border-focus : # ffb900 ;
3003
3025
--sidebar-background-color : # 505050 ;
3004
3026
--sidebar-background-color-hover : # 676767 ;
3027
+ --sidebar-border-color : # 999 ;
3005
3028
--code-block-background-color : # 2A2A2A ;
3006
3029
--scrollbar-track-background-color : # 717171 ;
3007
3030
--scrollbar-thumb-background-color : rgba (32 , 34 , 37 , .6 );
@@ -3114,6 +3137,7 @@ Original by Dempfi (https://github.com/dempfi/ayu)
3114
3137
--settings-button-border-focus : # e0e0e0 ;
3115
3138
--sidebar-background-color : # 14191f ;
3116
3139
--sidebar-background-color-hover : rgba (70 , 70 , 70 , 0.33 );
3140
+ --sidebar-border-color : # 5c6773 ;
3117
3141
--code-block-background-color : # 191f26 ;
3118
3142
--scrollbar-track-background-color : transparent;
3119
3143
--scrollbar-thumb-background-color : # 5c6773 ;
0 commit comments