0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-17 09:52:29 +01:00

Merge pull request #14051 from loic/issue13325

Address margins on .navbar-right to fix #13325 #13464.
This commit is contained in:
Mark Otto 2014-07-07 00:39:06 -07:00
commit 6f88238a6b

View File

@ -275,23 +275,7 @@
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(); }
}
@ -330,11 +314,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;
}
}
}
@ -379,14 +358,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
// --------------------------------------------------