Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoic Bistuer <loic.bistuer@gmail.com>2014-07-07 09:56:52 +0400
committerLoic Bistuer <loic.bistuer@gmail.com>2014-07-07 09:56:52 +0400
commite88fa909916ab8aa6e35a99b11f025470a4a067f (patch)
treee296f4844351120115ba90366810bfc58738e229 /less/navbar.less
parent043b40636c99c55d7331227401c447aefd699f4c (diff)
Address margins on .navbar-right to fix #13325 #13464.
This commit follows f9fde56.
Diffstat (limited to 'less/navbar.less')
-rw-r--r--less/navbar.less42
1 files changed, 19 insertions, 23 deletions
diff --git a/less/navbar.less b/less/navbar.less
index 571a186d2c..567825f612 100644
--- a/less/navbar.less
+++ b/less/navbar.less
@@ -271,26 +271,10 @@
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
@@ -326,11 +310,6 @@
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;
- }
}
}
@@ -375,14 +354,31 @@
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
// --------------------------------------------------