-
-
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
Add justified navs #18653
Changes from 5 commits
7dce71d
c3e21e0
545f605
11df632
d05de98
7619243
9f07b4a
1e63dfb
52faa8f
95c89eb
08b5541
fa53abc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
@@ -0,0 +1,60 @@ | ||||
// Justified nav links | ||||
// ------------------------- | ||||
|
||||
@mixin nav-justified { | ||||
width: 100%; | ||||
|
||||
.nav-item { | ||||
float: none; | ||||
} | ||||
|
||||
.nav-link { | ||||
margin-bottom: 5px; | ||||
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. Should use a variable instead of hardcoding |
||||
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; | ||||
border-radius: $border-radius; | ||||
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. All the |
||||
} | ||||
|
||||
.nav-link.active, | ||||
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. Make use of the bootstrap/scss/mixins/_hover.scss Line 27 in 86c0520
|
||||
.nav-link.active:hover, | ||||
.nav-link.active:focus { | ||||
border: 1px solid $nav-tabs-justified-link-border-color; | ||||
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. Should use a variable instead of hardcoding |
||||
} | ||||
|
||||
@include media-breakpoint-up(md) { | ||||
.nav-link { | ||||
border-bottom: 1px solid $nav-tabs-justified-link-border-color; | ||||
border-radius: $border-radius $border-radius 0 0; | ||||
} | ||||
.nav-link.active, | ||||
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. Line should be indented 4 spaces, but was indented 3 spaces 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. Again, use |
||||
.nav-link.active:hover, | ||||
.nav-link.active:focus { | ||||
border-bottom-color: $nav-tabs-justified-active-link-border-color; | ||||
} | ||||
} | ||||
} |
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.
Is the container necessary?
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.
no, i will remove that