File tree 1 file changed +35
-1
lines changed
1 file changed +35
-1
lines changed Original file line number Diff line number Diff line change @@ -52,13 +52,42 @@ div.rustdoc {
52
52
font-family : $font-family-serif ;
53
53
padding : 10px 15px 20px 15px ;
54
54
55
+ @media (max-width : 700px ) {
56
+ padding-top : 0 ;
57
+ }
58
+
55
59
.sidebar {
56
- padding-top : 32px ;
60
+ @media (min-width : 701px ) {
61
+ padding-top : 32px ;
62
+ }
63
+
57
64
.block > ul > li {
58
65
margin-right : -10px ;
59
66
}
60
67
}
61
68
69
+ #source-sidebar {
70
+ top : 32px ;
71
+ }
72
+
73
+ #sidebar-toggle {
74
+ top : 62px ;
75
+ }
76
+
77
+ @media (max-width : 700px ) {
78
+ .sidebar.mobile {
79
+ top : 32px ;
80
+
81
+ .sidebar-elems.show-it {
82
+ top : 77px ;
83
+ }
84
+
85
+ #sidebar-filler {
86
+ top : 32px ;
87
+ }
88
+ }
89
+ }
90
+
62
91
// this is actual fix for docs.rs navigation and rustdoc sidebar
63
92
position : absolute ;
64
93
left : 0 ;
@@ -69,6 +98,8 @@ div.rustdoc {
69
98
body {
70
99
padding : 0 ;
71
100
margin : 0 ;
101
+ // Since top navbar is fixed, we need to add padding to the body content.
102
+ padding-top : 32px ;
72
103
}
73
104
74
105
@@ -114,11 +145,14 @@ div.container-rustdoc {
114
145
}
115
146
116
147
div .nav-container {
148
+ // Nothing is supposed to be over or hovering the top navbar. Maybe add a few others '('? :)
149
+ z-index : 999 ;
117
150
height : 32px ;
118
151
border-bottom : 1px solid $color-border ;
119
152
background-color : #fff ;
120
153
left : 0 ;
121
154
right : 0 ;
155
+ top : 0 ;
122
156
position : fixed ;
123
157
124
158
li {
You can’t perform that action at this time.
0 commit comments