Improve the fixed search bar

The search bar will now behave in a "sticky" manner. This makes
the logo disappear more smoothly instead of being abruptly hidden.
Another upside is that the drop shadow will only appear once the
search bar is made fixed.
This commit is contained in:
Hugo Locurcio
2020-01-23 19:43:10 +01:00
parent 7275e7da10
commit bfb43a706a
2 changed files with 12 additions and 14 deletions

View File

@@ -423,11 +423,6 @@ code,
}
@media only screen and (min-width: 768px) {
.wy-side-nav-search {
/* Keep the search field visible when scrolling down */
position: fixed;
}
/* Simulate a drop shadow that only affects the bottom edge */
/* This is used to indicate the search bar is fixed */
.wy-side-nav-search::after {
@@ -514,14 +509,6 @@ code,
width: 308px;
}
@media only screen and (min-width: 768px) {
.wy-menu-vertical {
/* Account for the fixed logo and search form */
/* (prevents the navbar from being hidden behind it) */
margin-top: 330px;
}
}
.wy-menu-vertical a {
color: var(--navbar-level-1-color);
}