Skip to content

Commit

Permalink
Fix .dropdown-item border-radius when -padding-y is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
mdo committed Jun 2, 2022
1 parent ac89c36 commit c7d0cb2
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions scss/_dropdown.scss
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit c7d0cb2

Please sign in to comment.