Skip to content

Commit

Permalink
Fix border overlap
Browse files Browse the repository at this point in the history
  • Loading branch information
Leslie Lin committed May 7, 2024
1 parent f1edb89 commit 25aeb89
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions packages/core/src/components/button/_button-group.scss
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ Styleguide button-group
> .#{$ns}-button:not(:last-child) {
border-bottom-right-radius: 0;
border-top-right-radius: 0;
}
}

&:not(.#{$ns}-minimal):not(.#{$ns}-outlined) {
> .#{$ns}-popover-wrapper:not(:last-child) .#{$ns}-button,
> .#{$ns}-button:not(:last-child) {
margin-right: -$button-border-width;
}
}
Expand Down Expand Up @@ -139,6 +145,12 @@ Styleguide button-group
.#{$ns}-button {
@include pt-button-outlined();
}

&:not(.#{$ns}-vertical) {
.#{$ns}-button:not(:last-child) {
border-right: none;
}
}
}

.#{$ns}-popover-wrapper,
Expand Down Expand Up @@ -218,6 +230,10 @@ Styleguide button-group
margin-right: 0 !important; /* stylelint-disable-line declaration-no-important */
// needed to ensure buttons take up the full width when wrapped in a Popover:
width: 100%;

&:not(:last-child) {
border-bottom: none;
}
}

&:not(.#{$ns}-minimal), &.#{$ns}-outlined {
Expand All @@ -230,7 +246,9 @@ Styleguide button-group
> .#{$ns}-button:last-child {
border-radius: 0 0 $pt-border-radius $pt-border-radius;
}
}

&:not(.#{$ns}-minimal):not(.#{$ns}-outlined) {
> .#{$ns}-popover-wrapper:not(:last-child) .#{$ns}-button,
> .#{$ns}-button:not(:last-child) {
margin-bottom: -$button-border-width;
Expand Down

0 comments on commit 25aeb89

Please sign in to comment.