-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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
Add justified navs #18653
Closed
Closed
Add justified navs #18653
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
7dce71d
add justified nav support
bassjobsen c3e21e0
nav mixins for justified tabs (including dropdowns)
bassjobsen 545f605
Update _mixins.scss
bassjobsen 11df632
add Justified navs
bassjobsen d05de98
Update _nav.scss
bassjobsen 7619243
Update _variables.scss
bassjobsen 9f07b4a
Update _nav.scss
bassjobsen 1e63dfb
Update navs.md
bassjobsen 52faa8f
Update _nav.scss
bassjobsen 95c89eb
Update _nav.scss
bassjobsen 08b5541
Update _variables.scss
bassjobsen fa53abc
Update _nav.scss
bassjobsen 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 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 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 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 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 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 |
---|---|---|
@@ -0,0 +1,62 @@ | ||
// Justified nav links | ||
// ------------------------- | ||
|
||
@mixin nav-justified { | ||
width: 100%; | ||
|
||
.nav-item { | ||
float: none; | ||
} | ||
|
||
.nav-link { | ||
margin-bottom: $nav-tabs-justified-link-margin-bottom; | ||
text-align: center; | ||
} | ||
|
||
.dropdown .dropdown-menu { | ||
top: auto; | ||
left: auto; | ||
} | ||
|
||
@include media-breakpoint-up(md) { | ||
.nav-item { | ||
display: table-cell; | ||
width: 1%; | ||
} | ||
.nav-link { | ||
margin-bottom: 0; | ||
} | ||
} | ||
} | ||
|
||
// Move borders to anchors instead of bottom of list | ||
// | ||
// Mixin for adding on top the shared `.nav-justified` styles for our tabs | ||
@mixin nav-tabs-justified { | ||
border-bottom: 0; | ||
|
||
.nav-link { // Override margin from .nav-tabs | ||
margin-right: 0; | ||
@include border-radius($nav-tabs-justified-link-border-radius); | ||
} | ||
|
||
.nav-link.active { | ||
@include plain-hover-focus { | ||
border: $nav-tabs-justified-link-border-width solid $nav-tabs-justified-link-border-color; | ||
} | ||
} | ||
|
||
@include media-breakpoint-up(md) { | ||
.nav-link, | ||
.nav-link.disabled, | ||
.nav-link.disabled:hover { | ||
border-bottom: $nav-tabs-justified-link-border-width solid $nav-tabs-justified-link-border-color; | ||
@include border-top-radius($nav-tabs-justified-link-border-radius); | ||
} | ||
.nav-link.active { | ||
@include plain-hover-focus { | ||
border-bottom-color: $nav-tabs-justified-active-link-border-color; | ||
} | ||
} | ||
} | ||
} |
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.
Properties should be ordered margin-bottom, text-align