]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Fix dropdown radius if `$dropdown-padding-y` is not 0 (#28127)
authorMartijn Cuppens <martijn.cuppens@gmail.com>
Sun, 3 Feb 2019 21:07:16 +0000 (22:07 +0100)
committerXhmikosR <xhmikosr@gmail.com>
Sun, 3 Feb 2019 21:07:16 +0000 (23:07 +0200)
scss/_dropdown.scss

index b82eb1655a8cb183c6fd4eb616b87ada80eff2a6..5e975c242b245d506c563b2735d6cf43af2630ef 100644 (file)
   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 {