@@ -1998,17 +1998,16 @@ a.tooltip:hover::after {
1998
1998
left : 6px ;
1999
1999
height : 34px ;
2000
2000
width : 34px ;
2001
+ z-index : calc (var (--desktop-sidebar-z-index ) + 1 );
2001
2002
}
2002
2003
.hide-sidebar # sidebar-button {
2003
2004
left : 6px ;
2004
2005
background-color : var (--main-background-color );
2005
- z-index : 1 ;
2006
2006
}
2007
2007
.src # sidebar-button {
2008
2008
margin-top : 0 ;
2009
2009
top : 8px ;
2010
2010
left : 8px ;
2011
- z-index : calc (var (--desktop-sidebar-z-index ) + 1 );
2012
2011
border-color : var (--border-color );
2013
2012
}
2014
2013
.hide-sidebar .src # sidebar-button {
@@ -2040,14 +2039,14 @@ button#toggle-all-docs {
2040
2039
min-width : 0 ;
2041
2040
}
2042
2041
# sidebar-button > a {
2042
+ border : solid 1px transparent;
2043
+ border-radius : var (--button-border-radius );
2043
2044
background-color : var (--button-background-color );
2044
2045
width : 33px ;
2045
2046
}
2046
2047
.src # sidebar-button > a {
2047
- background-color : transparent;
2048
- }
2049
- # sidebar-button > a : hover , # sidebar-button > a : focus-visible {
2050
- background-color : var (--main-background-color );
2048
+ background-color : var (--sidebar-background-color );
2049
+ border-color : var (--border-color );
2051
2050
}
2052
2051
2053
2052
# search-button > a : hover , # search-button > a : focus-visible ,
@@ -2105,17 +2104,31 @@ button#toggle-all-docs::before {
2105
2104
}
2106
2105
2107
2106
.help-menu > a ::before {
2108
- /* Question mark with circle */
2109
- content : url ('data:image/svg+xml,<svg width="18" height="18" viewBox="0 0 12 12" \
2110
- enable-background= "new 0 0 12 12" xmlns="http://www.w3.org/2000/svg" fill="none">\
2111
- <circle r= "5.25" cx="6" cy="6" stroke-width="1.5" stroke="black"/>\
2112
- <text x= "6" y="7" style="font:8px sans-serif;font-weight:1000" text-anchor="middle" \
2113
- dominant-baseline="middle" fill="black">?</text></svg>');
2107
+ /* Question mark with "circle" */
2108
+ content : url ('data:image/svg+xml,\
2109
+ <svg width= "18" height="18" enable-background="new 0 0 12 12 " fill=" none" \
2110
+ version= "1.1" viewBox="0 0 12 12 " xmlns=" http://www.w3.org/2000/svg"> \
2111
+ <path d= "m6.007 0.6931c2.515 0 5.074 1.908 5.074 5.335 0 3.55-2.567 5.278-5.088 \
2112
+ 5.278 -2.477 0 -5.001 -1.742 -5.001 -5.3 0 -3.38 2.527 -5.314 5.014 -5.314 z" stroke="black" \
2113
+ stroke-width= "1.5" / > \
2114
+ <path d= "m5.999 7.932c0.3111 0 0.7062 0.2915 0.7062 0.7257 0 0.5458-0.3951 \
2115
+ 0.8099 -0.7081 0.8099 -0.2973 0 -0.7023 -0.266 -0.7023 -0.7668 0 -0.4695 0.3834 -0.7688 \
2116
+ 0.7042 -0.7688 z" fill="black"/>\
2117
+ <path d= "m4.281 3.946c0.0312-0.03057 0.06298-0.06029 0.09528-0.08916 0.4833-0.432 1.084-0.6722 \
2118
+ 1.634 -0.6722 1.141 0 1.508 1.043 1.221 1.621 -0.2753 0.5542 -1.061 0.5065 -1.273 \
2119
+ 1.595 -0.05728 0.2939 0.0134 0.9812 0.0134 1.205 " fill=" none" stroke="black" \
2120
+ stroke-width= "1.25" / > \
2121
+ </svg>');
2114
2122
width : 18px ;
2115
2123
height : 18px ;
2116
2124
filter : var (--settings-menu-filter );
2117
2125
}
2118
2126
2127
+ .help-menu > a {
2128
+ /* design hack to cope with "Help" being far shorter than "Settings" etc */
2129
+ width : 74px ;
2130
+ }
2131
+
2119
2132
# search-button > a ::before ,
2120
2133
button # toggle-all-docs ::before ,
2121
2134
.help-menu > a ::before ,
@@ -2154,9 +2167,9 @@ rustdoc-toolbar span.label {
2154
2167
/* sidebar resizer image */
2155
2168
content : url ('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 22" \
2156
2169
fill= "none" stroke="black">\
2157
- <rect x= "1" y="1 " width="20" height="20 " ry="1.5" stroke-width="1.5" stroke="%23777"/>\
2158
- <circle cx= "4.375" cy="4 .375" r="1" stroke-width=".75"/>\
2159
- <path d= "m7.6121 3v16 M5.375 7 .625h-2 m2 3h-2 m2 3h-2" stroke-width="1.25"/></svg>');
2170
+ <rect x= "1" y="2 " width="20" height="18 " ry="1.5" stroke-width="1.5" stroke="%23777"/>\
2171
+ <circle cx= "4.375" cy="5 .375" r="1" stroke-width=".75"/>\
2172
+ <path d= "m7.6121 4v14 M5.375 8 .625h-2 m2 3h-2 m2 3h-2" stroke-width="1.25"/></svg>');
2160
2173
width : 22px ;
2161
2174
height : 22px ;
2162
2175
}
@@ -2435,6 +2448,9 @@ However, it's not needed with smaller screen width because the doc/code block is
2435
2448
opacity : 0.75 ;
2436
2449
filter : var (--mobile-sidebar-menu-filter );
2437
2450
}
2451
+ .src # sidebar-button > a : hover {
2452
+ background : var (--main-background-color );
2453
+ }
2438
2454
.sidebar-menu-toggle : hover ::before ,
2439
2455
.sidebar-menu-toggle : active ::before ,
2440
2456
.sidebar-menu-toggle : focus ::before {
@@ -2457,32 +2473,34 @@ However, it's not needed with smaller screen width because the doc/code block is
2457
2473
2458
2474
/* Text label takes up too much space at this size. */
2459
2475
.main-heading {
2460
- grid-template-areas :
2461
- "main-heading-breadcrumbs main-heading-toolbar"
2462
- "main-heading-h1 main-heading-toolbar"
2463
- "main-heading-sub-heading main-heading-toolbar" ;
2476
+ grid-template-areas :
2477
+ "main-heading-breadcrumbs main-heading-toolbar"
2478
+ "main-heading-h1 main-heading-toolbar"
2479
+ "main-heading-sub-heading main-heading-toolbar" ;
2464
2480
}
2465
2481
.search-results-main-heading {
2466
- display : grid;
2467
- grid-template-areas :
2468
- "main-heading-breadcrumbs main-heading-toolbar"
2469
- "main-heading-breadcrumbs main-heading-toolbar"
2470
- "main-heading-h1 main-heading-toolbar" ;
2482
+ display : grid;
2483
+ grid-template-areas :
2484
+ "main-heading-breadcrumbs main-heading-toolbar"
2485
+ "main-heading-breadcrumbs main-heading-toolbar"
2486
+ "main-heading-h1 main-heading-toolbar" ;
2471
2487
}
2472
2488
rustdoc-toolbar {
2473
- display : grid;
2474
- grid-template-areas :
2475
- "x settings help"
2476
- "search summary summary" ;
2489
+ margin-top : -10px ;
2490
+ display : grid;
2491
+ grid-template-areas :
2492
+ "x settings help"
2493
+ "search summary summary" ;
2494
+ grid-template-rows : 35px 1fr ;
2477
2495
}
2478
2496
.search-results-main-heading rustdoc-toolbar {
2479
- display : grid;
2480
- grid-template-areas :
2481
- "settings help"
2482
- "search search" ;
2497
+ display : grid;
2498
+ grid-template-areas :
2499
+ "settings help"
2500
+ "search search" ;
2483
2501
}
2484
2502
.search-results-main-heading # toggle-all-docs {
2485
- display : none;
2503
+ display : none;
2486
2504
}
2487
2505
rustdoc-toolbar .settings-menu span .label ,
2488
2506
rustdoc-toolbar .help-menu span .label
@@ -2504,22 +2522,27 @@ However, it's not needed with smaller screen width because the doc/code block is
2504
2522
rustdoc-toolbar # toggle-all-docs {
2505
2523
grid-area : summary;
2506
2524
}
2525
+ rustdoc-toolbar .settings-menu ,
2526
+ rustdoc-toolbar .help-menu {
2527
+ height : 35px ;
2528
+ }
2507
2529
rustdoc-toolbar .settings-menu > a ,
2508
2530
rustdoc-toolbar .help-menu > a {
2509
- border-radius : 2px ;
2510
- text-align : center;
2511
- width : 40px ;
2531
+ border-radius : 2px ;
2532
+ text-align : center;
2533
+ width : 34px ;
2534
+ padding : 5px 0 ;
2512
2535
}
2513
2536
rustdoc-toolbar .settings-menu > a : before ,
2514
2537
rustdoc-toolbar .help-menu > a : before {
2515
- margin : 0 4px ;
2538
+ margin : 0 4px ;
2516
2539
}
2517
2540
# settings .popover {
2518
- top : 16px ;
2541
+ top : 16px ;
2519
2542
--popover-arrow-offset : 58px ;
2520
2543
}
2521
2544
# help .popover {
2522
- top : 16px ;
2545
+ top : 16px ;
2523
2546
--popover-arrow-offset : 16px ;
2524
2547
}
2525
2548
}
@@ -2554,42 +2577,29 @@ in src-script.js and main.js
2554
2577
2555
2578
2556
2579
/* Pull settings and help up into the top bar. */
2557
- .main-heading {
2558
- grid-template-areas :
2559
- "main-heading-breadcrumbs main-heading-breadcrumbs"
2560
- "main-heading-h1 main-heading-toolbar"
2561
- "main-heading-sub-heading main-heading-toolbar" ;
2562
- }
2563
- .search-results-main-heading {
2564
- display : grid;
2565
- grid-template-areas :
2566
- "main-heading-breadcrumbs main-heading-placeholder"
2567
- "main-heading-breadcrumbs main-heading-toolbar"
2568
- "main-heading-h1 main-heading-toolbar" ;
2569
- }
2570
2580
rustdoc-topbar span .label ,
2571
- rustdoc-toolbar .settings-menu ,
2572
- rustdoc-toolbar .help-menu
2581
+ html : not (. hide-sidebar ) . rustdoc : not (. src ) rustdoc -toolbar .settings-menu > a ,
2582
+ html : not (. hide-sidebar ) . rustdoc : not (. src ) rustdoc -toolbar .help-menu > a
2573
2583
{
2574
2584
display : none;
2575
2585
}
2576
2586
rustdoc-topbar .settings-menu > a ,
2577
2587
rustdoc-topbar .help-menu > a {
2578
2588
width : 33px ;
2579
- line-height : 0 ;
2589
+ line-height : 0 ;
2580
2590
}
2581
2591
rustdoc-topbar .settings-menu > a : hover ,
2582
2592
rustdoc-topbar .help-menu > a : hover {
2583
2593
border : none;
2584
- background : var (--main-background-color );
2585
- border-radius : 0 ;
2594
+ background : var (--main-background-color );
2595
+ border-radius : 0 ;
2586
2596
}
2587
2597
# settings .popover {
2588
- top : 32px ;
2598
+ top : 32px ;
2589
2599
--popover-arrow-offset : 48px ;
2590
2600
}
2591
2601
# help .popover {
2592
- top : 32px ;
2602
+ top : 32px ;
2593
2603
--popover-arrow-offset : 12px ;
2594
2604
}
2595
2605
@@ -2599,7 +2609,7 @@ in src-script.js and main.js
2599
2609
display : block;
2600
2610
}
2601
2611
2602
- main {
2612
+ html : not (. hide-sidebar ) main {
2603
2613
padding-left : 15px ;
2604
2614
padding-top : 0px ;
2605
2615
}
@@ -2638,6 +2648,9 @@ in src-script.js and main.js
2638
2648
height : 100vh ;
2639
2649
border : 0 ;
2640
2650
}
2651
+ html .src main {
2652
+ padding : 18px 0 ;
2653
+ }
2641
2654
.src .search-form {
2642
2655
margin-left : 40px ;
2643
2656
}
@@ -2659,7 +2672,7 @@ in src-script.js and main.js
2659
2672
2660
2673
rustdoc-topbar > h2 {
2661
2674
padding-bottom : 0 ;
2662
- margin : auto;
2675
+ margin : auto;
2663
2676
overflow : hidden;
2664
2677
/* Rare exception to specifying font sizes in rem. Since the topbar
2665
2678
height is specified in pixels, this also has to be specified in
@@ -2668,7 +2681,7 @@ in src-script.js and main.js
2668
2681
font-size : 24px ;
2669
2682
white-space : nowrap;
2670
2683
text-overflow : ellipsis;
2671
- text-align : center;
2684
+ text-align : center;
2672
2685
}
2673
2686
2674
2687
rustdoc-topbar .logo-container > img {
@@ -2693,9 +2706,9 @@ in src-script.js and main.js
2693
2706
}
2694
2707
2695
2708
.sidebar-menu-toggle {
2696
- /* prevent flexbox shrinking */
2709
+ /* prevent flexbox shrinking */
2697
2710
width : 41px ;
2698
- min-width : 41px ;
2711
+ min-width : 41px ;
2699
2712
border : none;
2700
2713
line-height : 0 ;
2701
2714
}
@@ -2718,15 +2731,16 @@ in src-script.js and main.js
2718
2731
}
2719
2732
2720
2733
/* sidebar button becomes topbar button */
2721
- .hide-sidebar # sidebar-button {
2722
- margin-top : 0 ;
2723
- }
2724
2734
# sidebar-button > a ::before {
2725
2735
content : url ('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" \
2726
2736
viewBox= "0 0 22 22" fill="none" stroke="black">\
2727
- <rect x= "1" y="1" width="20" height="20" ry="1.5" stroke-width="1.5" stroke="%23777"/>\
2728
- <circle cx= "4.375" cy="4.375" r="1" stroke-width=".75"/>\
2729
- <path d= "m3 7.375h16m0-3h-4" stroke-width="1.25"/></svg>');
2737
+ <rect x= "1" y="2" width="20" height="18" ry="1.5" stroke-width="1.5" stroke="%23777"/>\
2738
+ <g fill= "black" stroke="none">\
2739
+ <circle cx= "4.375" cy="5.375" r="1" stroke-width=".75"/>\
2740
+ <circle cx= "17.375" cy="5.375" r="1" stroke-width=".75"/>\
2741
+ <circle cx= "14.375" cy="5.375" r="1" stroke-width=".75"/>\
2742
+ </ g>\
2743
+ <path d= "m3 8.375h16" stroke-width="1.25"/></svg>');
2730
2744
width : 22px ;
2731
2745
height : 22px ;
2732
2746
}
0 commit comments