diff --git a/scss/_nav.scss b/scss/_nav.scss index ffb27d869c73..9508c1af32f3 100644 --- a/scss/_nav.scss +++ b/scss/_nav.scss @@ -18,6 +18,8 @@ font-weight: $nav-link-font-weight; color: $nav-link-color; text-decoration: if($link-decoration == none, null, none); + background: none; + border: 0; @include transition($nav-link-transition); &:hover, @@ -43,7 +45,6 @@ .nav-link { margin-bottom: -$nav-tabs-border-width; - background: none; border: $nav-tabs-border-width solid transparent; @include border-top-radius($nav-tabs-border-radius); @@ -83,8 +84,6 @@ .nav-pills { .nav-link { - background: none; - border: 0; @include border-radius($nav-pills-border-radius); } @@ -96,6 +95,24 @@ } +// +// Underline +// + +.nav-underline { + .nav-link { + border-bottom: .125rem solid transparent; + } + + .nav-link.active, + .show > .nav-link { + font-weight: $font-weight-bold; + color: $dark; + border-bottom-color: $dark; + } +} + + // // Justified variants // diff --git a/site/content/docs/5.0/components/navs-tabs.md b/site/content/docs/5.0/components/navs-tabs.md index 522dfd1cef7b..9dec035b3142 100644 --- a/site/content/docs/5.0/components/navs-tabs.md +++ b/site/content/docs/5.0/components/navs-tabs.md @@ -167,6 +167,27 @@ Take that same HTML, but use `.nav-pills` instead: {{< /example >}} +### Underline + +Take that same HTML, but use `.nav-underline` instead: + +{{< example >}} + +{{< /example >}} + ### Fill and justify Force your `.nav`'s contents to extend the full available width one of two modifier classes. To proportionately fill all available space with your `.nav-item`s, use `.nav-fill`. Notice that all horizontal space is occupied, but not every nav item has the same width.