aboutsummaryrefslogtreecommitdiff
path: root/less
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2013-05-02 23:05:09 -0700
committerMark Otto <[email protected]>2013-05-02 23:05:09 -0700
commit94792b9dae3800e739e0036d45a276c3127b103d (patch)
treef339e32b3fe681d253bd158bd21e3a437891bba5 /less
parent23ae6405f504a2627e1c1e8d856564fd8065dfe3 (diff)
downloadbootstrap-94792b9dae3800e739e0036d45a276c3127b103d.tar.xz
bootstrap-94792b9dae3800e739e0036d45a276c3127b103d.zip
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
Diffstat (limited to 'less')
-rw-r--r--less/navbar.less22
1 files changed, 9 insertions, 13 deletions
diff --git a/less/navbar.less b/less/navbar.less
index 88cb33bce..9511670cd 100644
--- a/less/navbar.less
+++ b/less/navbar.less
@@ -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
-}
-
-
*/