aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2022-05-26 14:40:19 -0700
committerMark Otto <[email protected]>2022-06-01 18:41:26 -0700
commit824c5a077bfed3a3d3d80aef4cae1bc486d69f79 (patch)
tree15db84c786b3f55cdb2ec08d5b4ded10f6c5249d
parentac89c3692b642daf0a2b6cc274715733a7a47d33 (diff)
downloadbootstrap-824c5a077bfed3a3d3d80aef4cae1bc486d69f79.tar.xz
bootstrap-824c5a077bfed3a3d3d80aef4cae1bc486d69f79.zip
Fix .dropdown-item border-radius when -padding-y is 0
-rw-r--r--scss/_dropdown.scss24
1 files changed, 12 insertions, 12 deletions
diff --git a/scss/_dropdown.scss b/scss/_dropdown.scss
index d4be30eea..62125b967 100644
--- a/scss/_dropdown.scss
+++ b/scss/_dropdown.scss
@@ -66,6 +66,18 @@
left: 0;
margin-top: var(--#{$prefix}dropdown-spacer);
}
+
+ @if $dropdown-padding-y == 0 {
+ > .dropdown-item:first-child,
+ > li:first-child .dropdown-item {
+ @include border-top-radius(var(--#{$prefix}dropdown-inner-border-radius));
+ }
+ > .dropdown-item:last-child,
+ > li:last-child .dropdown-item {
+ @include border-bottom-radius(var(--#{$prefix}dropdown-inner-border-radius));
+ }
+
+ }
}
// scss-docs-start responsive-breakpoints
@@ -172,18 +184,6 @@
background-color: transparent; // For `<button>`s
border: 0; // For `<button>`s
- // 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(var(--#{$prefix}dropdown-inner-border-radius));
- }
-
- &:last-child {
- @include border-bottom-radius(var(--#{$prefix}dropdown-inner-border-radius));
- }
- }
-
&:hover,
&:focus {
color: var(--#{$prefix}dropdown-link-hover-color);