@@ -348,21 +348,18 @@ nav.sub {
348348 position : sticky;
349349 min-width : 200px ;
350350 height : 100vh ;
351+ top : 0 ;
352+ left : 0 ;
351353}
352354
353355.rustdoc .source .sidebar {
354- overflow : auto;
355- }
356-
357- .source .sidebar {
358356 width : 50px ;
359357 min-width : 0px ;
360358 max-width : 300px ;
361359 flex-grow : 0 ;
362360 flex-shrink : 0 ;
363361 flex-basis : auto;
364362 border-right : 1px solid;
365- transition : width .5s ;
366363 overflow-x : hidden;
367364 /* The sidebar is by default hidden */
368365 overflow-y : hidden;
@@ -376,7 +373,7 @@ nav.sub {
376373
377374.source .sidebar .expanded {
378375 overflow-y : auto;
379- width : 300px !important ;
376+ width : 300px ;
380377}
381378
382379.source .sidebar .expanded > * {
@@ -1698,6 +1695,18 @@ details.rustdoc-toggle[open] > summary.hideme::after {
16981695 .docblock > .information : first-child > .tooltip {
16991696 margin-top : 16px ;
17001697 }
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+ }
17011710}
17021711
17031712@media (max-width : 700px ) {
@@ -1723,6 +1732,7 @@ details.rustdoc-toggle[open] > summary.hideme::after {
17231732 padding : 0 15px ;
17241733 position : static;
17251734 z-index : 11 ;
1735+ overflow-y : hidden;
17261736 }
17271737
17281738 .rustdoc .source > .sidebar {
@@ -1779,6 +1789,7 @@ details.rustdoc-toggle[open] > summary.hideme::after {
17791789 cursor : pointer;
17801790 width : 45px ;
17811791 left : 0 ;
1792+ top : 0 ;
17821793 text-align : center;
17831794 display : block;
17841795 border-bottom : 1px solid;
@@ -2052,6 +2063,10 @@ details.rustdoc-toggle[open] > summary.hideme::after {
20522063 height : 35px ;
20532064 width : 35px ;
20542065 }
2066+
2067+ .sidebar : not (.expanded ) # sidebar-toggle {
2068+ top : 10px ;
2069+ }
20552070}
20562071
20572072
0 commit comments