]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Address margins on .navbar-right to fix #13325 #13464. 14051/head
authorLoic Bistuer <loic.bistuer@gmail.com>
Mon, 7 Jul 2014 05:56:52 +0000 (12:56 +0700)
committerLoic Bistuer <loic.bistuer@gmail.com>
Mon, 7 Jul 2014 05:56:52 +0000 (12:56 +0700)
This commit follows f9fde56.

less/navbar.less

index 571a186d2ca74e42c3fe45dfa70c0969baf9f497..567825f6120c82c342899e11553a85b40fc39b1a 100644 (file)
         padding-bottom: @navbar-padding-vertical;
       }
     }
-
-    &.navbar-right:first-child {
-      margin-right: -@navbar-padding-horizontal;
-    }
   }
 }
 
 
-// Component alignment
-//
-// Repurpose the pull utilities as their own navbar utilities to avoid specificity
-// issues with parents and chaining. Only do this when the navbar is uncollapsed
-// though so that navbar contents properly stack and align in mobile.
-
-@media (min-width: @grid-float-breakpoint) {
-  .navbar-left  { .pull-left(); }
-  .navbar-right { .pull-right(); }
-}
-
-
 // Navbar form
 //
 // Extension of the `.form-inline` with some extra flavor for optimum display in
     padding-top: 0;
     padding-bottom: 0;
     .box-shadow(none);
-
-    // Outdent the form if first child to line up with content down the page
-    &.navbar-right:first-child {
-      margin-right: -@navbar-padding-horizontal;
-    }
   }
 }
 
     float: left;
     margin-left: @navbar-padding-horizontal;
     margin-right: @navbar-padding-horizontal;
+  }
+}
 
-    // Outdent the form if first child to line up with content down the page
-    &.navbar-right:first-child {
+
+// Component alignment
+//
+// Repurpose the pull utilities as their own navbar utilities to avoid specificity
+// issues with parents and chaining. Only do this when the navbar is uncollapsed
+// though so that navbar contents properly stack and align in mobile.
+//
+// Declared after the navbar components to ensure more specificity on the margins.
+
+@media (min-width: @grid-float-breakpoint) {
+  .navbar-left  { .pull-left(); }
+  .navbar-right {
+    .pull-right();
+    margin-right: -@navbar-padding-horizontal;
+
+    ~ .navbar-right {
       margin-right: 0;
     }
   }
 }
 
+
 // Alternate navbars
 // --------------------------------------------------