1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-27 15:19:52 +02:00

Fixes #10370: Improved and deprecated dropdown menu alignment options

* Removes an old pair of selectors that didn’t properly target the
right-aligned navbar alignment of dropdown menus.
* Deprecates the `.pull-right` alignment in favor of a more specific
and unique class name.
* Adds `.dropdown-menu-right` as the new alignment class. This is then
mixin-ed into the `.navbar-right.navbar-nav` dropdown menus for
auto-alignment.
* To override that auto-alignment, use `.dropdown-menu-left` as needed.
This commit is contained in:
Mark Otto
2013-12-14 13:22:56 -08:00
parent 914f5e6a1d
commit 11c6ab767c
5 changed files with 46 additions and 16 deletions

View File

@@ -2965,6 +2965,14 @@ input[type="button"].btn-block {
.open > a {
outline: 0;
}
.dropdown-menu-right {
right: 0;
left: auto;
}
.dropdown-menu-left {
right: auto;
left: 0;
}
.dropdown-header {
display: block;
padding: 3px 20px;
@@ -3001,6 +3009,10 @@ input[type="button"].btn-block {
right: 0;
left: auto;
}
.navbar-right .dropdown-menu-left {
right: auto;
left: 0;
}
}
.btn-group,
.btn-group-vertical {
@@ -3776,11 +3788,6 @@ textarea.input-group-sm > .input-group-btn > .btn {
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
.navbar-nav.pull-right > li > .dropdown-menu,
.navbar-nav > li > .dropdown-menu.pull-right {
right: 0;
left: auto;
}
.navbar-btn {
margin-top: 8px;
margin-bottom: 8px;