diff options
| author | Mark Otto <[email protected]> | 2013-12-14 15:38:21 -0800 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2013-12-14 15:38:21 -0800 |
| commit | a54dbfdf2a08ff04fc65f8e4f77ee5dc76bf4ef3 (patch) | |
| tree | 9b1c5697a731543a86711b016e1986ec1e81dad4 /less/dropdowns.less | |
| parent | 80e86442308b2cc86ba948de87e854057933e3ab (diff) | |
| parent | f1869771bc8b8e8a6c7a98385ec58e0bf0d2d98e (diff) | |
| download | bootstrap-a54dbfdf2a08ff04fc65f8e4f77ee5dc76bf4ef3.tar.xz bootstrap-a54dbfdf2a08ff04fc65f8e4f77ee5dc76bf4ef3.zip | |
Merge branch 'master' into pr/10951
Conflicts:
dist/css/bootstrap.min.css
less/modals.less
Diffstat (limited to 'less/dropdowns.less')
| -rw-r--r-- | less/dropdowns.less | 41 |
1 files changed, 31 insertions, 10 deletions
diff --git a/less/dropdowns.less b/less/dropdowns.less index e6bd18779..dde2038e3 100644 --- a/less/dropdowns.less +++ b/less/dropdowns.less @@ -10,12 +10,9 @@ height: 0; margin-left: 2px; vertical-align: middle; - border-top: @caret-width-base solid @dropdown-caret-color; + border-top: @caret-width-base solid; border-right: @caret-width-base solid transparent; border-left: @caret-width-base solid transparent; - // Firefox fix for https://github.com/twbs/bootstrap/issues/9538. Once fixed, - // we can just straight up remove this. - border-bottom: 0 dotted; } // The dropdown wrapper (div) @@ -49,6 +46,8 @@ background-clip: padding-box; // Aligns the dropdown menu to right + // + // Deprecated as of 3.1 in favor of `.dropdown-menu-[dir]` &.pull-right { right: 0; left: auto; @@ -129,6 +128,25 @@ } } +// Menu positioning +// +// Add extra class to `.dropdown-menu` to flip the alignment of the dropdown +// menu with the parent. +.dropdown-menu-right { + left: auto; // Reset the default from `.dropdown-menu` + right: 0; +} +// With v3, we enabled auto-flipping if you have a dropdown within a right +// aligned nav component. To enable the undoing of that, we provide an override +// to restore the default dropdown menu alignment. +// +// This is only for left-aligning a dropdown menu within a `.navbar-right` or +// `.pull-right` nav component. +.dropdown-menu-left { + left: 0; + right: auto; +} + // Dropdown section headers .dropdown-header { display: block; @@ -145,7 +163,7 @@ right: 0; bottom: 0; top: 0; - z-index: @zindex-dropdown - 10; + z-index: (@zindex-dropdown - 10); } // Right aligned dropdowns @@ -163,10 +181,8 @@ .navbar-fixed-bottom .dropdown { // Reverse the caret .caret { - // Firefox fix for https://github.com/twbs/bootstrap/issues/9538. Once this - // gets fixed, restore `border-top: 0;`. - border-top: 0 dotted; - border-bottom: 4px solid @dropdown-caret-color; + border-top: 0; + border-bottom: @caret-width-base solid; content: ""; } // Different positioning for bottom up menu @@ -185,7 +201,12 @@ @media (min-width: @grid-float-breakpoint) { .navbar-right { .dropdown-menu { - .pull-right > .dropdown-menu(); + .dropdown-menu-right(); + } + // Necessary for overrides of the default right aligned menu. + // Will remove come v4 in all likelihood. + .dropdown-menu-left { + .dropdown-menu-left(); } } } |
