@@ -348,21 +348,18 @@ nav.sub {
348
348
position : sticky;
349
349
min-width : 200px ;
350
350
height : 100vh ;
351
+ top : 0 ;
352
+ left : 0 ;
351
353
}
352
354
353
355
.rustdoc .source .sidebar {
354
- overflow : auto;
355
- }
356
-
357
- .source .sidebar {
358
356
width : 50px ;
359
357
min-width : 0px ;
360
358
max-width : 300px ;
361
359
flex-grow : 0 ;
362
360
flex-shrink : 0 ;
363
361
flex-basis : auto;
364
362
border-right : 1px solid;
365
- transition : width .5s ;
366
363
overflow-x : hidden;
367
364
/* The sidebar is by default hidden */
368
365
overflow-y : hidden;
@@ -376,7 +373,7 @@ nav.sub {
376
373
377
374
.source .sidebar .expanded {
378
375
overflow-y : auto;
379
- width : 300px !important ;
376
+ width : 300px ;
380
377
}
381
378
382
379
.source .sidebar .expanded > * {
@@ -1698,6 +1695,18 @@ details.rustdoc-toggle[open] > summary.hideme::after {
1698
1695
.docblock > .information : first-child > .tooltip {
1699
1696
margin-top : 16px ;
1700
1697
}
1698
+
1699
+ /* When we expand the sidebar on the source code page, we hide the logo on the left of the
1700
+ search bar to have more space. */
1701
+ .sidebar .expanded + main .main-inner .sub-logo-container .rust-logo {
1702
+ display : none;
1703
+ }
1704
+
1705
+ /* It doesn't render well on mobile because of the layout, so better only have the transition
1706
+ on desktop. */
1707
+ .rustdoc .source .sidebar {
1708
+ transition : width .5s ;
1709
+ }
1701
1710
}
1702
1711
1703
1712
@media (max-width : 700px ) {
@@ -1723,6 +1732,7 @@ details.rustdoc-toggle[open] > summary.hideme::after {
1723
1732
padding : 0 15px ;
1724
1733
position : static;
1725
1734
z-index : 11 ;
1735
+ overflow-y : hidden;
1726
1736
}
1727
1737
1728
1738
.rustdoc .source > .sidebar {
@@ -1779,6 +1789,7 @@ details.rustdoc-toggle[open] > summary.hideme::after {
1779
1789
cursor : pointer;
1780
1790
width : 45px ;
1781
1791
left : 0 ;
1792
+ top : 0 ;
1782
1793
text-align : center;
1783
1794
display : block;
1784
1795
border-bottom : 1px solid;
@@ -2052,6 +2063,10 @@ details.rustdoc-toggle[open] > summary.hideme::after {
2052
2063
height : 35px ;
2053
2064
width : 35px ;
2054
2065
}
2066
+
2067
+ .sidebar : not (.expanded ) # sidebar-toggle {
2068
+ top : 10px ;
2069
+ }
2055
2070
}
2056
2071
2057
2072
0 commit comments