-
-
Notifications
You must be signed in to change notification settings - Fork 79k
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
v4: Simplify navbar further #21462
Merged
Merged
v4: Simplify navbar further #21462
Conversation
This file contains 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
it's important, yo
since we're no longer using the .nav as a base class, we need to bring over some base styles for redoing browser list styles and setting flex in motion. also brings with it some .nav-link styling. we're still using this global class, but with this small modification for alignment of content in responsive modes.
- since we're column to start, need to set row. - note that flex-direction cannot be inherited, so we have to set it twice. - apply the horizontal padding again to .nav-link. - remove the .nav-item styles (un-needed). - remove previous .nav-link styles as they were un-nested and potentially problematic in old placement should someone mix more navs in here.
this was mad confusing for awhile
houndci-bot
reviewed
Dec 29, 2016
.navbar-toggler { | ||
align-self: flex-start; // Prevent toggler from growing to full width when it's the only visible navbar child |
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.
Properties should be ordered padding, font-size, line-height, background, border, align-self
houndci-bot
reviewed
Dec 29, 2016
list-style: none; | ||
|
||
.nav-link { | ||
padding-left: 0; |
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.
Properties should be ordered padding-right, padding-left
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR aims to do a bit more simplification and improvements to the navbar. It addresses the list of todos from #21460 as a follow-up to redoing the navs with flexbox.
.navbar
use flex andflex-direction: column
to start for fewer overrides and easier mobile-first styling..nav
on our.navbar-nav
.flex-grow: 10
that was rather random from.navbar-nav
and uses.mr-auto
for easy spacing of flex items. (This was recently added to our flex utils docs.)