aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2013-06-20 17:15:09 -0700
committerMark Otto <[email protected]>2013-06-20 17:15:09 -0700
commitef8e5853cbfc4f4babacd3527ab3eb0e4b741acc (patch)
treebbd3bb51bbbdd25ba11efd0b1517601d05fba2f9
parent82f9de94593ea5dd8a8efd6a317a6c8b319cfff2 (diff)
downloadbootstrap-ef8e5853cbfc4f4babacd3527ab3eb0e4b741acc.tar.xz
bootstrap-ef8e5853cbfc4f4babacd3527ab3eb0e4b741acc.zip
Fixes #8154: enforce full width `.navbar-nav.pull-right` in mobile
Prevents an odd alignment issue in mobile views by forcing the nav links to be full width without undoing the float.
-rw-r--r--docs/assets/css/bootstrap.css5
-rw-r--r--less/navbar.less7
2 files changed, 12 insertions, 0 deletions
diff --git a/docs/assets/css/bootstrap.css b/docs/assets/css/bootstrap.css
index 9379177da..685e2e984 100644
--- a/docs/assets/css/bootstrap.css
+++ b/docs/assets/css/bootstrap.css
@@ -3481,6 +3481,10 @@ button.close {
background-color: transparent;
}
+.navbar-nav.pull-right {
+ width: 100%;
+}
+
.navbar-static-top {
border-radius: 0;
}
@@ -3709,6 +3713,7 @@ button.close {
}
.navbar-nav.pull-right {
float: right;
+ width: auto;
}
.navbar-toggle {
position: relative;
diff --git a/less/navbar.less b/less/navbar.less
index 59ea92dbd..54f4b75ab 100644
--- a/less/navbar.less
+++ b/less/navbar.less
@@ -48,6 +48,12 @@
color: @navbar-link-disabled-color;
background-color: @navbar-link-disabled-bg;
}
+
+ // Right aligned contents
+ // Make them full width first so that they align properly on mobile
+ &.pull-right {
+ width: 100%;
+ }
}
@@ -296,6 +302,7 @@
&.pull-right {
float: right;
+ width: auto;
}
}