aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scss/_dropdown.scss14
1 files changed, 9 insertions, 5 deletions
diff --git a/scss/_dropdown.scss b/scss/_dropdown.scss
index b82eb1655..5e975c242 100644
--- a/scss/_dropdown.scss
+++ b/scss/_dropdown.scss
@@ -132,12 +132,16 @@
background-color: transparent; // For `<button>`s
border: 0; // For `<button>`s
- &:first-child {
- @include border-top-radius($dropdown-inner-border-radius);
- }
+ // Prevent dropdown overflow if there's no padding
+ // See https://github.com/twbs/bootstrap/pull/27703
+ @if $dropdown-padding-y == 0 {
+ &:first-child {
+ @include border-top-radius($dropdown-inner-border-radius);
+ }
- &:last-child {
- @include border-bottom-radius($dropdown-inner-border-radius);
+ &:last-child {
+ @include border-bottom-radius($dropdown-inner-border-radius);
+ }
}
@include hover-focus {