1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-22 21:22:52 +02:00

Fix conflict with Bootstrap CSS

This commit is contained in:
Martijn Cuppens
2020-11-25 22:12:32 +02:00
committed by XhmikosR
parent 4447157446
commit d8f247392d
2 changed files with 24 additions and 27 deletions

View File

@@ -32,19 +32,29 @@
border: $dropdown-border-width solid $dropdown-border-color;
@include border-radius($dropdown-border-radius);
@include box-shadow($dropdown-box-shadow);
// Reset positioning when positioned with Popper
&[style] {
right: auto;
}
}
// scss-docs-start responsive-breakpoints
// We deliberately hardcode the `bs-` prefix because we check
// this custom property in JS to determine Popper's positioning
@each $breakpoint in map-keys($grid-breakpoints) {
@include media-breakpoint-up($breakpoint) {
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
.dropdown-menu#{$infix}-start {
--bs-position: start;
right: auto #{"/* rtl:ignore */"};
left: 0 #{"/* rtl:ignore */"};
}
.dropdown-menu#{$infix}-end {
--bs-position: end;
right: 0 #{"/* rtl:ignore */"};
left: auto #{"/* rtl:ignore */"};
}
@@ -101,19 +111,6 @@
}
}
// When Popper is enabled, reset the basic dropdown position
// stylelint-disable-next-line no-duplicate-selectors
.dropdown-menu {
&[data-popper-placement^="top"],
&[data-popper-placement^="right"],
&[data-popper-placement^="bottom"],
&[data-popper-placement^="left"] {
right: auto;
bottom: auto;
left: auto;
}
}
// Dividers (basically an `<hr>`) within the dropdown
.dropdown-divider {