const PLACEMENT_LEFT = isRTL ? 'right-start' : 'left-start'
const Default = {
- offset: [0, 0],
+ offset: [0, 2],
flip: true,
boundary: 'clippingParents',
reference: 'toggle',
const Default = {
...Tooltip.Default,
placement: 'right',
+ offset: [0, 8],
trigger: 'click',
content: '',
template: '<div class="popover" role="tooltip">' +
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; // Override default margin of ul
@include font-size($dropdown-font-size);
color: $dropdown-color;
text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)
.dropdown-menu {
top: auto;
bottom: 100%;
- margin-top: 0;
- margin-bottom: $dropdown-spacer;
+
+ &.show:not([data-popper-placement]) {
+ margin-top: 0;
+ margin-bottom: $dropdown-spacer;
+ }
}
.dropdown-toggle {
top: 0;
right: auto;
left: 100%;
- margin-top: 0;
- margin-left: $dropdown-spacer;
+
+ &.show:not([data-popper-placement]) {
+ margin-top: 0;
+ margin-left: $dropdown-spacer;
+ }
}
.dropdown-toggle {
top: 0;
right: 100%;
left: auto;
- margin-top: 0;
- margin-right: $dropdown-spacer;
+
+ &.show:not([data-popper-placement]) {
+ margin-top: 0;
+ margin-right: $dropdown-spacer;
+ }
}
.dropdown-toggle {
.dropdown-menu.show {
display: block;
+
+ &:not([data-popper-placement]) {
+ margin-top: $dropdown-spacer;
+ }
}
// Dropdown section headers
}
.bs-popover-top {
- // Overrule margin set by popper.js
- margin-bottom: $popover-arrow-height !important; // stylelint-disable-line declaration-no-important
-
> .popover-arrow {
bottom: subtract(-$popover-arrow-height, $popover-border-width);
}
.bs-popover-end {
- // Overrule margin set by popper.js
- margin-left: $popover-arrow-height !important; // stylelint-disable-line declaration-no-important
-
> .popover-arrow {
left: subtract(-$popover-arrow-height, $popover-border-width);
width: $popover-arrow-height;
}
.bs-popover-bottom {
- // Overrule margin set by popper.js
- margin-top: $popover-arrow-height !important; // stylelint-disable-line declaration-no-important
-
> .popover-arrow {
top: subtract(-$popover-arrow-height, $popover-border-width);
}
.bs-popover-start {
- // Overrule margin set by popper.js
- margin-right: $popover-arrow-height !important; // stylelint-disable-line declaration-no-important
-
> .popover-arrow {
right: subtract(-$popover-arrow-height, $popover-border-width);
width: $popover-arrow-height;
<tr>
<td><code>offset</code></td>
<td>array | string | function</td>
- <td><code>[0, 0]</code></td>
+ <td><code>[0, 2]</code></td>
<td>
<p>Offset of the dropdown relative to its target. You can pass a string in data attributes with comma separated values like: <code>data-bs-offset="10,20"</code></p>
<p>When a function is used to determine the offset, it is called with an object containing the popper placement, the reference, and popper rects as its first argument. The triggering element DOM node is passed as the second argument. The function must return an array with two numbers: <code>[<a href="https://popper.js.org/docs/v2/modifiers/offset/#skidding-1">skidding</a>, <a href="https://popper.js.org/docs/v2/modifiers/offset/#distance-1">distance</a>]</code>.</p>
<tr>
<td><code>offset</code></td>
<td>array | string | function</td>
- <td><code>[0, 0]</code></td>
+ <td><code>[0, 8]</code></td>
<td>
<p>Offset of the popover relative to its target. You can pass a string in data attributes with comma separated values like: <code>data-bs-offset="10,20"</code></p>
<p>When a function is used to determine the offset, it is called with an object containing the popper placement, the reference, and popper rects as its first argument. The triggering element DOM node is passed as the second argument. The function must return an array with two numbers: <code>[<a href="https://popper.js.org/docs/v2/modifiers/offset/#skidding-1">skidding</a>, <a href="https://popper.js.org/docs/v2/modifiers/offset/#distance-1">distance</a>]</code>.</p>