1
0
Fork 0
mirror of https://github.com/twbs/bootstrap.git synced 2022-11-09 12:25:43 -05:00

Apply positioning only when Popper is not used

This commit is contained in:
Rohit Sharma 2021-03-25 00:59:45 +05:30 committed by Mark Otto
parent d25920b182
commit 7100a0da52

View file

@ -16,7 +16,6 @@
// The dropdown menu // The dropdown menu
.dropdown-menu { .dropdown-menu {
position: absolute; position: absolute;
top: 100%;
z-index: $zindex-dropdown; z-index: $zindex-dropdown;
display: none; // none by default, but block on "open" of the menu display: none; // none by default, but block on "open" of the menu
min-width: $dropdown-min-width; min-width: $dropdown-min-width;
@ -33,6 +32,7 @@
@include box-shadow($dropdown-box-shadow); @include box-shadow($dropdown-box-shadow);
&[data-bs-popper] { &[data-bs-popper] {
top: 100%;
left: 0; left: 0;
margin-top: $dropdown-spacer; margin-top: $dropdown-spacer;
} }
@ -83,16 +83,13 @@
} }
.dropend { .dropend {
.dropdown-menu { .dropdown-menu[data-bs-popper] {
top: 0; top: 0;
right: auto; right: auto;
left: 100%; left: 100%;
&[data-bs-popper] {
margin-top: 0; margin-top: 0;
margin-left: $dropdown-spacer; margin-left: $dropdown-spacer;
} }
}
.dropdown-toggle { .dropdown-toggle {
@include caret(end); @include caret(end);
@ -103,16 +100,13 @@
} }
.dropstart { .dropstart {
.dropdown-menu { .dropdown-menu[data-bs-popper] {
top: 0; top: 0;
right: 100%; right: 100%;
left: auto; left: auto;
&[data-bs-popper] {
margin-top: 0; margin-top: 0;
margin-right: $dropdown-spacer; margin-right: $dropdown-spacer;
} }
}
.dropdown-toggle { .dropdown-toggle {
@include caret(start); @include caret(start);