@@ -19,7 +19,7 @@ $color-lifetime-incode: #B76514; // orangish
1919$color-comment-in-code : #8E908C ; // light gray
2020$color-background-code : #F5F5F5 ; // lighter gray
2121$color-border : #ddd ; // gray
22-
22+ $top-navbar-height : 32 px ; // height of the floating top navbar
2323
2424
2525// pure compatible media queries
@@ -58,7 +58,7 @@ div.rustdoc {
5858
5959 .sidebar {
6060 @media (min-width : 701px ) {
61- padding -top : 32 px ;
61+ margin -top : $top-navbar-height ;
6262 }
6363
6464 .block > ul > li {
@@ -67,7 +67,7 @@ div.rustdoc {
6767 }
6868
6969 #source-sidebar {
70- top : 32 px ;
70+ top : $top-navbar-height ;
7171 }
7272
7373 #sidebar-toggle {
@@ -76,14 +76,14 @@ div.rustdoc {
7676
7777 @media (max-width : 700px ) {
7878 .sidebar.mobile {
79- top : 32 px ;
79+ top : $top-navbar-height ;
8080
8181 .sidebar-elems.show-it {
8282 top : 77px ;
8383 }
8484
8585 #sidebar-filler {
86- top : 32 px ;
86+ top : $top-navbar-height ;
8787 }
8888 }
8989 }
@@ -92,14 +92,16 @@ div.rustdoc {
9292 position : absolute ;
9393 left : 0 ;
9494 right : 0 ;
95- top : 32px ;
95+ top : $top-navbar-height ;
96+ overflow-y : auto ;
97+ max-height : calc (100vh - #{$top-navbar-height } );
9698}
9799
98100body {
99101 padding : 0 ;
100102 margin : 0 ;
101103 // Since top navbar is fixed, we need to add padding to the body content.
102- padding-top : 32 px ;
104+ padding-top : $top-navbar-height ;
103105}
104106
105107
@@ -141,14 +143,13 @@ div.container {
141143}
142144
143145div .container-rustdoc {
144- max-width : 1200px ;
145146 text-align : left ;
146147}
147148
148149div .nav-container {
149150 // Nothing is supposed to be over or hovering the top navbar. Maybe add a few others '('? :)
150151 z-index : 999 ;
151- height : 32 px ;
152+ height : $top-navbar-height ;
152153 border-bottom : 1px solid $color-border ;
153154 background-color : #fff ;
154155 left : 0 ;
@@ -175,6 +176,8 @@ div.nav-container {
175176 }
176177
177178 form .landing-search-form-nav {
179+ max-width : 1200px ;
180+
178181 input .search-input-nav {
179182 float : right ;
180183 max-width : 200px ;
0 commit comments