]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Center text in navbar with change to @baseLineHeight (18 -> 20px) 4402/head
authorMickael Perraud <mikaelkael.fr@gmail.com>
Tue, 14 Aug 2012 22:11:57 +0000 (00:11 +0200)
committerMickael Perraud <mikaelkael.fr@gmail.com>
Tue, 14 Aug 2012 22:11:57 +0000 (00:11 +0200)
less/navbar.less

index 4306047c70b53238e1fc9f76fba89e4363eb8625..4599d808d3700598802b2f7975477fccfd28cce1 100644 (file)
@@ -47,9 +47,7 @@
   float: left;
   display: block;
   // Vertically center the text given @navbarHeight
-  @elementHeight: 20px;
-  @heightDifference: @navbarHeight - @elementHeight;
-  padding: ((@heightDifference / 2) - 2) 20px ((@heightDifference / 2) + 2);
+  padding: ((@navbarHeight - @baseLineHeight) / 2) 20px ((@navbarHeight - @baseLineHeight) / 2);
   margin-left: -20px; // negative indent to left-align the text down the page
   font-size: 20px;
   font-weight: 200;
 .navbar .nav > li > a {
   float: none;
   // Vertically center the text given @navbarHeight
-  @elementHeight: 20px;
-  padding: ((@navbarHeight - @elementHeight) / 2) 15px ((@navbarHeight - @elementHeight) / 2);
+  padding: ((@navbarHeight - @baseLineHeight) / 2) 15px ((@navbarHeight - @baseLineHeight) / 2);
   color: @navbarLinkColor;
   text-decoration: none;
   text-shadow: 0 1px 0 @navbarBackgroundHighlight;