@@ -2002,17 +2002,16 @@ a.tooltip:hover::after {
2002
2002
left : 6px ;
2003
2003
height : 34px ;
2004
2004
width : 34px ;
2005
+ z-index : calc (var (--desktop-sidebar-z-index ) + 1 );
2005
2006
}
2006
2007
.hide-sidebar # sidebar-button {
2007
2008
left : 6px ;
2008
2009
background-color : var (--main-background-color );
2009
- z-index : 1 ;
2010
2010
}
2011
2011
.src # sidebar-button {
2012
2012
margin-top : 0 ;
2013
2013
top : 8px ;
2014
2014
left : 8px ;
2015
- z-index : calc (var (--desktop-sidebar-z-index ) + 1 );
2016
2015
border-color : var (--border-color );
2017
2016
}
2018
2017
.hide-sidebar .src # sidebar-button {
@@ -2044,14 +2043,14 @@ button#toggle-all-docs {
2044
2043
min-width : 0 ;
2045
2044
}
2046
2045
# sidebar-button > a {
2046
+ border : solid 1px transparent;
2047
+ border-radius : var (--button-border-radius );
2047
2048
background-color : var (--button-background-color );
2048
2049
width : 33px ;
2049
2050
}
2050
2051
.src # sidebar-button > a {
2051
- background-color : transparent;
2052
- }
2053
- # sidebar-button > a : hover , # sidebar-button > a : focus-visible {
2054
- background-color : var (--main-background-color );
2052
+ background-color : var (--sidebar-background-color );
2053
+ border-color : var (--border-color );
2055
2054
}
2056
2055
2057
2056
# search-button > a : hover , # search-button > a : focus-visible ,
@@ -2109,17 +2108,31 @@ button#toggle-all-docs::before {
2109
2108
}
2110
2109
2111
2110
.help-menu > a ::before {
2112
- /* Question mark with circle */
2113
- content : url ('data:image/svg+xml,<svg width="18" height="18" viewBox="0 0 12 12" \
2114
- enable-background= "new 0 0 12 12" xmlns="http://www.w3.org/2000/svg" fill="none">\
2115
- <circle r= "5.25" cx="6" cy="6" stroke-width="1.5" stroke="black"/>\
2116
- <text x= "6" y="7" style="font:8px sans-serif;font-weight:1000" text-anchor="middle" \
2117
- dominant-baseline="middle" fill="black">?</text></svg>');
2111
+ /* Question mark with "circle" */
2112
+ content : url ('data:image/svg+xml,\
2113
+ <svg width= "18" height="18" enable-background="new 0 0 12 12 " fill=" none" \
2114
+ version= "1.1" viewBox="0 0 12 12 " xmlns=" http://www.w3.org/2000/svg"> \
2115
+ <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 \
2116
+ 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" \
2117
+ stroke-width= "1.5" / > \
2118
+ <path d= "m5.999 7.932c0.3111 0 0.7062 0.2915 0.7062 0.7257 0 0.5458-0.3951 \
2119
+ 0.8099 -0.7081 0.8099 -0.2973 0 -0.7023 -0.266 -0.7023 -0.7668 0 -0.4695 0.3834 -0.7688 \
2120
+ 0.7042 -0.7688 z" fill="black"/>\
2121
+ <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 \
2122
+ 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 \
2123
+ 1.595 -0.05728 0.2939 0.0134 0.9812 0.0134 1.205 " fill=" none" stroke="black" \
2124
+ stroke-width= "1.25" / > \
2125
+ </svg>');
2118
2126
width : 18px ;
2119
2127
height : 18px ;
2120
2128
filter : var (--settings-menu-filter );
2121
2129
}
2122
2130
2131
+ .help-menu > a {
2132
+ /* design hack to cope with "Help" being far shorter than "Settings" etc */
2133
+ width : 74px ;
2134
+ }
2135
+
2123
2136
# search-button > a ::before ,
2124
2137
button # toggle-all-docs ::before ,
2125
2138
.help-menu > a ::before ,
@@ -2158,9 +2171,9 @@ rustdoc-toolbar span.label {
2158
2171
/* sidebar resizer image */
2159
2172
content : url ('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 22" \
2160
2173
fill= "none" stroke="black">\
2161
- <rect x= "1" y="1 " width="20" height="20 " ry="1.5" stroke-width="1.5" stroke="%23777"/>\
2162
- <circle cx= "4.375" cy="4 .375" r="1" stroke-width=".75"/>\
2163
- <path d= "m7.6121 3v16 M5.375 7 .625h-2 m2 3h-2 m2 3h-2" stroke-width="1.25"/></svg>');
2174
+ <rect x= "1" y="2 " width="20" height="18 " ry="1.5" stroke-width="1.5" stroke="%23777"/>\
2175
+ <circle cx= "4.375" cy="5 .375" r="1" stroke-width=".75"/>\
2176
+ <path d= "m7.6121 4v14 M5.375 8 .625h-2 m2 3h-2 m2 3h-2" stroke-width="1.25"/></svg>');
2164
2177
width : 22px ;
2165
2178
height : 22px ;
2166
2179
}
@@ -2439,6 +2452,9 @@ However, it's not needed with smaller screen width because the doc/code block is
2439
2452
opacity : 0.75 ;
2440
2453
filter : var (--mobile-sidebar-menu-filter );
2441
2454
}
2455
+ .src # sidebar-button > a : hover {
2456
+ background : var (--main-background-color );
2457
+ }
2442
2458
.sidebar-menu-toggle : hover ::before ,
2443
2459
.sidebar-menu-toggle : active ::before ,
2444
2460
.sidebar-menu-toggle : focus ::before {
@@ -2461,32 +2477,34 @@ However, it's not needed with smaller screen width because the doc/code block is
2461
2477
2462
2478
/* Text label takes up too much space at this size. */
2463
2479
.main-heading {
2464
- grid-template-areas :
2465
- "main-heading-breadcrumbs main-heading-toolbar"
2466
- "main-heading-h1 main-heading-toolbar"
2467
- "main-heading-sub-heading main-heading-toolbar" ;
2480
+ grid-template-areas :
2481
+ "main-heading-breadcrumbs main-heading-toolbar"
2482
+ "main-heading-h1 main-heading-toolbar"
2483
+ "main-heading-sub-heading main-heading-toolbar" ;
2468
2484
}
2469
2485
.search-results-main-heading {
2470
- display : grid;
2471
- grid-template-areas :
2472
- "main-heading-breadcrumbs main-heading-toolbar"
2473
- "main-heading-breadcrumbs main-heading-toolbar"
2474
- "main-heading-h1 main-heading-toolbar" ;
2486
+ display : grid;
2487
+ grid-template-areas :
2488
+ "main-heading-breadcrumbs main-heading-toolbar"
2489
+ "main-heading-breadcrumbs main-heading-toolbar"
2490
+ "main-heading-h1 main-heading-toolbar" ;
2475
2491
}
2476
2492
rustdoc-toolbar {
2477
- display : grid;
2478
- grid-template-areas :
2479
- "x settings help"
2480
- "search summary summary" ;
2493
+ margin-top : -10px ;
2494
+ display : grid;
2495
+ grid-template-areas :
2496
+ "x settings help"
2497
+ "search summary summary" ;
2498
+ grid-template-rows : 35px 1fr ;
2481
2499
}
2482
2500
.search-results-main-heading rustdoc-toolbar {
2483
- display : grid;
2484
- grid-template-areas :
2485
- "settings help"
2486
- "search search" ;
2501
+ display : grid;
2502
+ grid-template-areas :
2503
+ "settings help"
2504
+ "search search" ;
2487
2505
}
2488
2506
.search-results-main-heading # toggle-all-docs {
2489
- display : none;
2507
+ display : none;
2490
2508
}
2491
2509
rustdoc-toolbar .settings-menu span .label ,
2492
2510
rustdoc-toolbar .help-menu span .label
@@ -2508,22 +2526,27 @@ However, it's not needed with smaller screen width because the doc/code block is
2508
2526
rustdoc-toolbar # toggle-all-docs {
2509
2527
grid-area : summary;
2510
2528
}
2529
+ rustdoc-toolbar .settings-menu ,
2530
+ rustdoc-toolbar .help-menu {
2531
+ height : 35px ;
2532
+ }
2511
2533
rustdoc-toolbar .settings-menu > a ,
2512
2534
rustdoc-toolbar .help-menu > a {
2513
- border-radius : 2px ;
2514
- text-align : center;
2515
- width : 40px ;
2535
+ border-radius : 2px ;
2536
+ text-align : center;
2537
+ width : 34px ;
2538
+ padding : 5px 0 ;
2516
2539
}
2517
2540
rustdoc-toolbar .settings-menu > a : before ,
2518
2541
rustdoc-toolbar .help-menu > a : before {
2519
- margin : 0 4px ;
2542
+ margin : 0 4px ;
2520
2543
}
2521
2544
# settings .popover {
2522
- top : 16px ;
2545
+ top : 16px ;
2523
2546
--popover-arrow-offset : 58px ;
2524
2547
}
2525
2548
# help .popover {
2526
- top : 16px ;
2549
+ top : 16px ;
2527
2550
--popover-arrow-offset : 16px ;
2528
2551
}
2529
2552
}
@@ -2558,42 +2581,29 @@ in src-script.js and main.js
2558
2581
2559
2582
2560
2583
/* Pull settings and help up into the top bar. */
2561
- .main-heading {
2562
- grid-template-areas :
2563
- "main-heading-breadcrumbs main-heading-breadcrumbs"
2564
- "main-heading-h1 main-heading-toolbar"
2565
- "main-heading-sub-heading main-heading-toolbar" ;
2566
- }
2567
- .search-results-main-heading {
2568
- display : grid;
2569
- grid-template-areas :
2570
- "main-heading-breadcrumbs main-heading-placeholder"
2571
- "main-heading-breadcrumbs main-heading-toolbar"
2572
- "main-heading-h1 main-heading-toolbar" ;
2573
- }
2574
2584
rustdoc-topbar span .label ,
2575
- rustdoc-toolbar .settings-menu ,
2576
- rustdoc-toolbar .help-menu
2585
+ html : not (. hide-sidebar ) . rustdoc : not (. src ) rustdoc -toolbar .settings-menu > a ,
2586
+ html : not (. hide-sidebar ) . rustdoc : not (. src ) rustdoc -toolbar .help-menu > a
2577
2587
{
2578
2588
display : none;
2579
2589
}
2580
2590
rustdoc-topbar .settings-menu > a ,
2581
2591
rustdoc-topbar .help-menu > a {
2582
2592
width : 33px ;
2583
- line-height : 0 ;
2593
+ line-height : 0 ;
2584
2594
}
2585
2595
rustdoc-topbar .settings-menu > a : hover ,
2586
2596
rustdoc-topbar .help-menu > a : hover {
2587
2597
border : none;
2588
- background : var (--main-background-color );
2589
- border-radius : 0 ;
2598
+ background : var (--main-background-color );
2599
+ border-radius : 0 ;
2590
2600
}
2591
2601
# settings .popover {
2592
- top : 32px ;
2602
+ top : 32px ;
2593
2603
--popover-arrow-offset : 48px ;
2594
2604
}
2595
2605
# help .popover {
2596
- top : 32px ;
2606
+ top : 32px ;
2597
2607
--popover-arrow-offset : 12px ;
2598
2608
}
2599
2609
@@ -2603,7 +2613,7 @@ in src-script.js and main.js
2603
2613
display : block;
2604
2614
}
2605
2615
2606
- main {
2616
+ html : not (. hide-sidebar ) main {
2607
2617
padding-left : 15px ;
2608
2618
padding-top : 0px ;
2609
2619
}
@@ -2642,6 +2652,9 @@ in src-script.js and main.js
2642
2652
height : 100vh ;
2643
2653
border : 0 ;
2644
2654
}
2655
+ html .src main {
2656
+ padding : 18px 0 ;
2657
+ }
2645
2658
.src .search-form {
2646
2659
margin-left : 40px ;
2647
2660
}
@@ -2663,7 +2676,7 @@ in src-script.js and main.js
2663
2676
2664
2677
rustdoc-topbar > h2 {
2665
2678
padding-bottom : 0 ;
2666
- margin : auto;
2679
+ margin : auto;
2667
2680
overflow : hidden;
2668
2681
/* Rare exception to specifying font sizes in rem. Since the topbar
2669
2682
height is specified in pixels, this also has to be specified in
@@ -2672,7 +2685,7 @@ in src-script.js and main.js
2672
2685
font-size : 24px ;
2673
2686
white-space : nowrap;
2674
2687
text-overflow : ellipsis;
2675
- text-align : center;
2688
+ text-align : center;
2676
2689
}
2677
2690
2678
2691
rustdoc-topbar .logo-container > img {
@@ -2697,9 +2710,9 @@ in src-script.js and main.js
2697
2710
}
2698
2711
2699
2712
.sidebar-menu-toggle {
2700
- /* prevent flexbox shrinking */
2713
+ /* prevent flexbox shrinking */
2701
2714
width : 41px ;
2702
- min-width : 41px ;
2715
+ min-width : 41px ;
2703
2716
border : none;
2704
2717
line-height : 0 ;
2705
2718
}
@@ -2722,15 +2735,16 @@ in src-script.js and main.js
2722
2735
}
2723
2736
2724
2737
/* sidebar button becomes topbar button */
2725
- .hide-sidebar # sidebar-button {
2726
- margin-top : 0 ;
2727
- }
2728
2738
# sidebar-button > a ::before {
2729
2739
content : url ('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" \
2730
2740
viewBox= "0 0 22 22" fill="none" stroke="black">\
2731
- <rect x= "1" y="1" width="20" height="20" ry="1.5" stroke-width="1.5" stroke="%23777"/>\
2732
- <circle cx= "4.375" cy="4.375" r="1" stroke-width=".75"/>\
2733
- <path d= "m3 7.375h16m0-3h-4" stroke-width="1.25"/></svg>');
2741
+ <rect x= "1" y="2" width="20" height="18" ry="1.5" stroke-width="1.5" stroke="%23777"/>\
2742
+ <g fill= "black" stroke="none">\
2743
+ <circle cx= "4.375" cy="5.375" r="1" stroke-width=".75"/>\
2744
+ <circle cx= "17.375" cy="5.375" r="1" stroke-width=".75"/>\
2745
+ <circle cx= "14.375" cy="5.375" r="1" stroke-width=".75"/>\
2746
+ </ g>\
2747
+ <path d= "m3 8.375h16" stroke-width="1.25"/></svg>');
2734
2748
width : 22px ;
2735
2749
height : 22px ;
2736
2750
}
0 commit comments