1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-11 16:14:04 +02:00

Remove the initial margin from dropdown/popover in favor of Popper (#32524)

* Remove the margin from dropdown in favor of Popper

- Set the default margin to 0 for dropdowns (To remove the Popper's  warning)
- Set the required offset in dropdown's defaults

* Remove the margin from the popover component

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
Rohit Sharma
2021-02-04 01:07:25 +05:30
committed by GitHub
parent a1bb65ef49
commit 217d84d6b2
6 changed files with 24 additions and 22 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

@@ -25,6 +25,7 @@ const BSCLS_PREFIX_REGEX = new RegExp(`(^|\\s)${CLASS_PREFIX}\\S+`, 'g')
const Default = {
...Tooltip.Default,
placement: 'right',
offset: [0, 8],
trigger: 'click',
content: '',
template: '<div class="popover" role="tooltip">' +