diff --git a/templates/header/topbar_begin.html b/templates/header/topbar_begin.html
index f621074b8..c28e5ed4d 100644
--- a/templates/header/topbar_begin.html
+++ b/templates/header/topbar_begin.html
@@ -3,9 +3,6 @@
The only piece of context it can take is `search_query`, which should
be a string and will populate the search field if it exists
#}
-
-{%- import "macros.html" as macros -%}
-
diff --git a/templates/style/_navbar.scss b/templates/style/_navbar.scss
index 82a1bf171..9458d3aad 100644
--- a/templates/style/_navbar.scss
+++ b/templates/style/_navbar.scss
@@ -29,6 +29,11 @@ div.nav-container {
/* The font size must be specified in pixels because the height is specified in pixels. */
font: 16px $font-family-sans;
+ .container, .pure-menu-horizontal {
+ position: relative;
+ height: 100%;
+ }
+
li {
border-left: 1px solid var(--color-border);
}
@@ -40,18 +45,18 @@ div.nav-container {
background-color: var(--color-background);
}
&:after {
- font-size: 0.8em;
+ font-size: 12.8px;
content: "\25BC"
}
}
.pure-menu-link {
- font-size: 0.8em;
+ font-size: 12.8px;
font-weight: 400;
color: var(--color-navbar-standard);
&.description {
- font-size: 0.9em;
+ font-size: 14.4px;
}
// Improves menu link readability when inverting the colors on focus.
@@ -73,18 +78,17 @@ div.nav-container {
}
}
- .pure-menu-right {
- float: right;
- }
-
form.landing-search-form-nav {
max-width: 1200px;
+ height: 100%;
+ display: flex;
+ flex-direction: row;
#search-input-nav {
- float: right;
max-width: 150px;
display: none;
border-left: 1px solid var(--color-border);
+ height: 100%;
@media #{$media-sm} {
display: block;
@@ -98,16 +102,16 @@ div.nav-container {
color: var(--color-navbar-standard);
cursor: pointer;
padding-left: 0.5rem;
- font-size: 0.8em;
+ font-size: 12.8px;
}
input {
border: none;
margin: 0 1em 0 0;
- font-size: 0.8em;
+ font-size: 12.8px;
box-shadow: none;
background-color: var(--color-background);
- height: 31px;
+ height: 100%;
}
}
@@ -115,15 +119,16 @@ div.nav-container {
outline: unset;
}
+ .docsrs-logo, .pure-menu-item a {
+ padding: 6.4px 16px 6.4px 16px;
+ }
+
+ .docsrs-logo, .pure-menu-item, .pure-menu-item a {
+ height: 100%;
+ }
- /* In some unusual situations, like a locally installed copy of "Fira Sans," elements
- of the navbar might overflow vertically and start interfering with the main body
- content. To ensure that doesn't happen, hide any vertical overflow.
- See https://github.com/rust-lang/docs.rs/issues/1669.
- */
- .pure-menu-item a {
- /* 0.5 em is the padding */
- max-height: calc(#{$top-navbar-height} - 0.5em * 2);
+ .spacer {
+ flex-grow: 1;
}
}
@@ -271,7 +276,7 @@ div.nav-container {
p.description {
font-family: $font-family-sans;
- font-size: 0.8em;
+ font-size: 12.8px;
color: var(--color-navbar-standard);
padding: 0.5em 1em;
margin: 0;