]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Rearrange navbar.less and improve vertical divider support
authorMark Otto <otto@github.com>
Thu, 17 Jan 2013 19:34:46 +0000 (11:34 -0800)
committerMark Otto <otto@github.com>
Thu, 17 Jan 2013 19:34:46 +0000 (11:34 -0800)
docs/assets/css/bootstrap.css
less/navbar.less

index 151c3dd02c2ddfbfd73aef8976ac3eac17ea2e40..d001c03cdc1d504d943b42a696635abc38b1b23a 100644 (file)
@@ -2975,6 +2975,52 @@ button.close {
   clear: both;
 }
 
+.navbar .nav {
+  margin-top: 15px;
+}
+
+.navbar .nav > li > a {
+  padding-top: 15px;
+  padding-bottom: 15px;
+  line-height: 20px;
+  color: #777777;
+}
+
+.navbar .nav > li > a:hover,
+.navbar .nav > li > a:focus {
+  color: #333333;
+  background-color: transparent;
+}
+
+.navbar .nav > .active > a,
+.navbar .nav > .active > a:hover,
+.navbar .nav > .active > a:focus {
+  color: #555555;
+  background-color: #d5d5d5;
+}
+
+.navbar-static-top {
+  position: static;
+  border-radius: 0;
+}
+
+.navbar-fixed-top,
+.navbar-fixed-bottom {
+  position: fixed;
+  right: 0;
+  left: 0;
+  z-index: 1030;
+  border-radius: 0;
+}
+
+.navbar-fixed-top {
+  top: 0;
+}
+
+.navbar-fixed-bottom {
+  bottom: 0;
+}
+
 .navbar .brand {
   display: inline-block;
   padding: 7px 15px;
@@ -3010,28 +3056,59 @@ button.close {
   margin-top: 3px;
 }
 
-.navbar .nav {
-  margin-top: 15px;
+.navbar .divider-vertical {
+  height: 30px;
+  margin: 10px 9px;
+  border-right: 1px solid #fbfbfb;
+  border-left: 1px solid #e1e1e1;
 }
 
-.navbar .nav > li > a {
-  padding-top: 15px;
-  padding-bottom: 15px;
-  line-height: 20px;
-  color: #777777;
+.navbar-form {
+  margin-top: 9px;
+  margin-bottom: 9px;
 }
 
-.navbar .nav > li > a:hover,
-.navbar .nav > li > a:focus {
-  color: #333333;
+.navbar-inverse {
+  background-color: #222222;
+}
+
+.navbar-inverse .brand {
+  color: #999999;
+}
+
+.navbar-inverse .brand:hover {
+  color: #808080;
   background-color: transparent;
 }
 
-.navbar .nav > .active > a,
-.navbar .nav > .active > a:hover,
-.navbar .nav > .active > a:focus {
-  color: #555555;
-  background-color: #d5d5d5;
+.navbar-inverse .navbar-text {
+  color: #999999;
+}
+
+.navbar-inverse .nav > li > a {
+  color: #999999;
+}
+
+.navbar-inverse .nav > li > a:hover,
+.navbar-inverse .nav > li > a:focus {
+  color: #ffffff;
+  background-color: transparent;
+}
+
+.navbar-inverse .nav > .active > a,
+.navbar-inverse .nav > .active > a:hover,
+.navbar-inverse .nav > .active > a:focus {
+  color: #ffffff;
+  background-color: #222222;
+}
+
+.navbar-inverse .btn-navbar {
+  background-color: #444;
+}
+
+.navbar-inverse .divider-vertical {
+  border-right-color: #2f2f2f;
+  border-left-color: #151515;
 }
 
 @media screen and (min-width: 768px) {
@@ -3072,78 +3149,6 @@ button.close {
   }
 }
 
-.navbar-inverse {
-  background-color: #222222;
-}
-
-.navbar-inverse .brand {
-  color: #999999;
-}
-
-.navbar-inverse .brand:hover {
-  color: #808080;
-  background-color: transparent;
-}
-
-.navbar-inverse .navbar-text {
-  color: #999999;
-}
-
-.navbar-inverse .nav > li > a {
-  color: #999999;
-}
-
-.navbar-inverse .nav > li > a:hover,
-.navbar-inverse .nav > li > a:focus {
-  color: #ffffff;
-  background-color: transparent;
-}
-
-.navbar-inverse .nav > .active > a,
-.navbar-inverse .nav > .active > a:hover,
-.navbar-inverse .nav > .active > a:focus {
-  color: #ffffff;
-  background-color: #222222;
-}
-
-.navbar-inverse .btn-navbar {
-  background-color: #444;
-}
-
-.navbar-static-top {
-  position: static;
-  border-radius: 0;
-}
-
-.navbar-fixed-top,
-.navbar-fixed-bottom {
-  position: fixed;
-  right: 0;
-  left: 0;
-  z-index: 1030;
-  border-radius: 0;
-}
-
-.navbar-fixed-top {
-  top: 0;
-}
-
-.navbar-fixed-bottom {
-  bottom: 0;
-}
-
-.navbar .divider-vertical {
-  height: 26px;
-  margin: 7px 9px;
-  border-right: 1px solid #fbfbfb;
-  border-left: 1px solid #e1e1e1;
-}
-
-.navbar-form {
-  margin-top: 9px;
-  margin-bottom: 9px;
-}
-
 /*
 
 // Janky solution for now to account for links outside the .nav
index be2073fa2e67f9a9161ad9cf22bea0013d4a8dad..7484becbdf309e0f40ab59833b1ad74285b6ac51 100644 (file)
   .clear_float();
 }
 
-// Brand/project name
+// Navbar nav links
 // -------------------------
 
+.navbar {
+  .nav {
+    margin-top: 15px; // space out from .navbar .brand and .btn-navbar
+  }
+  .nav > li > a {
+    padding-top: (@navbar-height - @line-height-base) / 2;
+    padding-bottom: (@navbar-height - @line-height-base) / 2;
+    color: @navbar-link-color;
+    line-height: 20px;
+  }
+  .nav > li > a:hover,
+  .nav > li > a:focus {
+    color: @navbar-link-color-hover;
+    background-color: @navbar-link-bg-hover;
+  }
+  .nav > .active > a,
+  .nav > .active > a:hover,
+  .nav > .active > a:focus {
+    color: @navbar-link-color-active;
+    background-color: @navbar-link-bg-active;
+  }
+}
+
+
+
+//
+// Navbar alignment options
+// --------------------------------------------------
+
+// Static navbar
+.navbar-static-top {
+  position: static;
+  border-radius: 0;
+}
+
+// Fixed navbar
+.navbar-fixed-top,
+.navbar-fixed-bottom {
+  position: fixed;
+  right: 0;
+  left: 0;
+  z-index: @zindex-navbar-fixed;
+  border-radius: 0;
+}
+.navbar-fixed-top    { top: 0; }
+.navbar-fixed-bottom { bottom: 0; }
+
+
+
+//
+// Navbar optional components
+// --------------------------------------------------
+
+// Brand/project name
 .navbar .brand {
   display: inline-block;
   padding: 7px 15px;
@@ -28,9 +82,7 @@
   }
 }
 
-// Responsive navbar button
-// -------------------------
-
+// Collapsible navbar toggle
 .btn-navbar {
   float: right;
   padding: 10px 12px;
   }
 }
 
-// Navbar nav links
-// -------------------------
-
-.navbar {
-  .nav {
-    margin-top: 15px; // space out from .navbar .brand and .btn-navbar
-  }
-  .nav > li > a {
-    padding-top: (@navbar-height - @line-height-base) / 2;
-    padding-bottom: (@navbar-height - @line-height-base) / 2;
-    color: @navbar-link-color;
-    line-height: 20px;
-  }
-  .nav > li > a:hover,
-  .nav > li > a:focus {
-    color: @navbar-link-color-hover;
-    background-color: @navbar-link-bg-hover;
-  }
-  .nav > .active > a,
-  .nav > .active > a:hover,
-  .nav > .active > a:focus {
-    color: @navbar-link-color-active;
-    background-color: @navbar-link-bg-active;
-  }
+// Dividers in navbar
+.navbar .divider-vertical {
+  height: @navbar-height * .6;
+  margin: (@navbar-height * .2) 9px;
+  border-left: 1px solid darken(@navbar-bg, 5%);
+  border-right: 1px solid lighten(@navbar-bg, 5%);
 }
 
-@media screen and (min-width: 768px) {
-  .navbar {
-    padding-top: 0;
-    padding-bottom: 0;
-  }
-  .navbar .brand {
-    float: left;
-    padding-top: (@navbar-height - @line-height-base) / 2;
-    padding-bottom: (@navbar-height - @line-height-base) / 2;
-    margin-left: -15px;
-  }
-  .navbar .nav {
-    float: left;
-    margin-top: 0; // undo top margin to make nav extend full height of navbar
-    .clear_float();
+// Navbar form
+.navbar-form {
+  .navbar-vertical-align(32px); // Vertically center in navbar
+}
 
-    &.pull-right {
-      float: right;
-    }
-  }
-  .navbar .nav > li {
-    float: left;
-  }
 
-  // Required to make the collapsing navbar work on regular desktops
-  .navbar .btn-navbar {
-    display: none;
-  }
-  .nav-collapse.collapse {
-    height: auto !important;
-    overflow: visible !important;
-  }
-}
 
 // Inverse navbar
-// -------------------------
+// --------------------------------------------------
 
 .navbar-inverse {
     background-color: @navbar-inverse-bg;
     color: @navbar-inverse-link-color-active;
     background-color: @navbar-inverse-link-bg-active;
   }
+
   .btn-navbar {
     background-color: #444;
   }
-}
-
 
-
-//
-// Navbar alignment options
-// --------------------------------------------------
-
-// Static navbar
-.navbar-static-top {
-  position: static;
-  border-radius: 0;
+  .divider-vertical {
+    border-left-color: darken(@navbar-inverse-bg, 5%);
+    border-right-color: lighten(@navbar-inverse-bg, 5%);
+  }
 }
 
-// Fixed navbar
-.navbar-fixed-top,
-.navbar-fixed-bottom {
-  position: fixed;
-  right: 0;
-  left: 0;
-  z-index: @zindex-navbar-fixed;
-  border-radius: 0;
-}
-.navbar-fixed-top    { top: 0; }
-.navbar-fixed-bottom { bottom: 0; }
 
 
-//
-// Navbar optional components
+// Inverse navbar
 // --------------------------------------------------
 
-// Dividers in navbar
-.navbar .divider-vertical {
-  height: 26px;
-  margin: 7px 9px;
-  border-left: 1px solid darken(@navbar-bg, 5%);
-  border-right: 1px solid lighten(@navbar-bg, 5%);
-}
-
-// Navbar form
-.navbar-form {
-  .navbar-vertical-align(32px); // Vertically center in navbar
-}
+@media screen and (min-width: 768px) {
+  .navbar {
+    padding-top: 0;
+    padding-bottom: 0;
+  }
+  .navbar .brand {
+    float: left;
+    padding-top: (@navbar-height - @line-height-base) / 2;
+    padding-bottom: (@navbar-height - @line-height-base) / 2;
+    margin-left: -15px;
+  }
+  .navbar .nav {
+    float: left;
+    margin-top: 0; // undo top margin to make nav extend full height of navbar
+    .clear_float();
 
+    &.pull-right {
+      float: right;
+    }
+  }
+  .navbar .nav > li {
+    float: left;
+  }
 
+  // Required to make the collapsing navbar work on regular desktops
+  .navbar .btn-navbar {
+    display: none;
+  }
+  .nav-collapse.collapse {
+    height: auto !important;
+    overflow: visible !important;
+  }
+}
 
 /*