WIP: Fix the Popper warning issue

- Set the default margin to 0 for dropdowns
- Set the required offset in dropdowns
This commit is contained in:
Rohit Sharma 2020-12-16 20:39:24 +05:30
parent 7270c8ddc3
commit 98fe781fa5
2 changed files with 7 additions and 2 deletions

View file

@ -72,7 +72,7 @@ const PLACEMENT_RIGHT = isRTL ? 'left-start' : 'right-start'
const PLACEMENT_LEFT = isRTL ? 'right-start' : 'left-start'
const Default = {
offset: [0, 0],
offset: [0, 2],
flip: true,
boundary: 'clippingParents',
reference: 'toggle',

View file

@ -22,7 +22,7 @@
display: none; // none by default, but block on "open" of the menu
min-width: $dropdown-min-width;
padding: $dropdown-padding-y $dropdown-padding-x;
margin: $dropdown-spacer 0 0; // override default ul
margin: 0; // Let Popper handle the space by offset
@include font-size($dropdown-font-size);
color: $dropdown-color;
text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)
@ -174,6 +174,11 @@
.dropdown-menu.show {
display: block;
&:not([data-popper-placement]) {
margin: $dropdown-spacer 0 0; // override default ul for dropdown not using Popper
}
}
// Dropdown section headers