1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-22 13:13:03 +02:00

introduce new mixin to do navbar vertical centering

This commit is contained in:
Mark Otto
2012-02-20 19:14:26 -08:00
parent 143b3db2c9
commit d2630ff84e
4 changed files with 26 additions and 15 deletions

View File

@@ -531,7 +531,7 @@
// COMPONENT MIXINS
// --------------------------------------------------
// NAV DIVIDER
// Horizontal dividers
// -------------------------
// Dividers (basically an hr) within dropdowns and nav lists
.nav-divider() {
@@ -549,7 +549,7 @@
*margin: -5px 0 5px;
}
// BUTTON BACKGROUNDS
// Button backgrounds
// ------------------
.buttonBackground(@startColor, @endColor) {
// gradientBar will set the background to a pleasing blend of these, to support IE<=9
@@ -568,7 +568,15 @@
}
}
// POPOVER ARROWS
// Navbar vertical align
// -------------------------
// Vertically center elements in the navbar.
// Example: an element has a height of 30px, so write out `.navbarVerticalAlign(30px);` to calculate the appropriate top margin.
.navbarVerticalAlign(@elementHeight) {
margin-top: (@navbarHeight - @elementHeight) / 2;
}
// Popover arrows
// -------------------------
// For tipsies and popovers
#popoverArrow {