1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-30 08:39:56 +02:00

v4: Flexbox nav options (#21201)

* Add some flexbox nav components
  - Includes .nav-justified for inline, tab, and pill nav components
  - Includes example of using the flex utils (.d- and .flex-items-) for centered nav
* redo heading hierarchy a bit
This commit is contained in:
Mark Otto
2016-11-25 17:46:13 -08:00
committed by GitHub
parent f2b98f6b2c
commit d315c9499d
2 changed files with 114 additions and 4 deletions

View File

@@ -155,3 +155,25 @@
display: block;
}
}
// Justified navigation (flexbox only)
//
// 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.
@if $enable-flex {
.nav-justified {
display: flex;
.nav-item {
flex: 1;
text-align: center;
}
}
}