diff options
author | Mark Otto <markdotto@gmail.com> | 2016-12-23 21:40:54 +0300 |
---|---|---|
committer | Mark Otto <markd.otto@gmail.com> | 2016-12-25 01:21:04 +0300 |
commit | d9baeeb0af7a8ad982fe7ba9e9e3efd4c2190fdf (patch) | |
tree | fe47fa91a0957bf9aa889325fa3b059f87290091 /scss/_nav.scss | |
parent | 699d8a5a804db30219f159c2b3a623422574ff3d (diff) |
Change up the "justified" nav options
Given move to flexbox, we can make this available for everyone and clean it up some.
- Simplifies the `.nav-justified` styles to build on the flex-powered `.nav` base class.
- Adds the `.nav-fill` to make nav links fill available horizontal space, but not equal width.
Diffstat (limited to 'scss/_nav.scss')
-rw-r--r-- | scss/_nav.scss | 44 |
1 files changed, 15 insertions, 29 deletions
diff --git a/scss/_nav.scss b/scss/_nav.scss index 66d16ef061..123d2b844b 100644 --- a/scss/_nav.scss +++ b/scss/_nav.scss @@ -96,24 +96,30 @@ } } -.nav-stacked { + +// +// Justified variants +// + +.nav-fill { .nav-item { - display: block; - float: none; + flex: 1 1 auto; + text-align: center; + } +} - + .nav-item { - margin-top: $nav-item-margin; - margin-left: 0; - } +.nav-justified { + .nav-item { + flex: 1 1 100%; + text-align: center; } } -// // Tabbable tabs // - // Hide tabbable panes to start, show them when `.active` + .tab-content { > .tab-pane { display: none; @@ -122,23 +128,3 @@ display: block; } } - - -// Justified navigation -// -// Justified nav components are only built for flexbox mode in Bootstrap 4. In -// previous versions, this component variation was limited to anchor-based nav -// implementations--meaning it couldn't be used on button elements. This is due -// to a longstanding Safari bug in responsive table styles. -// -// Using flexbox, we avoid that problem altogether at the cost of no default -// justified navigation for default Bootstrap. Sorry, y'all <3. - -.nav-justified { - display: flex; - - .nav-item { - flex: 1; - text-align: center; - } -} |