-
Notifications
You must be signed in to change notification settings - Fork 212
Fix top navbar style #1719
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Fix top navbar style #1719
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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,32 +102,33 @@ 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%; | ||
} | ||
} | ||
|
||
input.search-input-nav:focus { | ||
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%; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is also unnecessary. |
||
} | ||
|
||
/* 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; | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can get rid of this
height: 100%
. That makes the search field vertically misaligned, but you can fix that by also removing theheight: 100%
on line 92.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without the
height: 100%
: