2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-08 17:22:31 +03:00

Improve buttons in navbars

* Add top margin, calculated by subtracting height of an input from height of a navbar, and dividing by two
* Uses the same method as .navbar-form
* To use, add .navbar-btn to any button outside a form element
* Also add section to docs detailing buttons in navbars, and add more ids for the other unlinked and unmentioned sections in the side nav
This commit is contained in:
Mark Otto
2013-05-02 23:05:09 -07:00
parent 23ae6405f5
commit 94792b9dae
3 changed files with 23 additions and 18 deletions
+9 -13
View File
@@ -299,6 +299,15 @@
}
// Buttons in navbar
//
// Vertically center a button within a navbar (when *not* in a form).
.navbar-btn {
margin-top: ((@navbar-height - @input-height-base) / 2);
}
/*
// Janky solution for now to account for links outside the .nav
@@ -310,17 +319,4 @@
}
}
// Buttons in navbar
// -------------------------
.navbar .btn,
.navbar .btn-group {
.navbarVerticalAlign(30px); // Vertically center in navbar
}
.navbar .btn-group .btn,
.navbar .input-prepend .btn,
.navbar .input-append .btn {
margin-top: 0; // then undo the margin here so we don't accidentally double it
}
*/