Skip to content

Commit

Permalink
Add clip-path to fix visual artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
tjonx committed Jul 19, 2023
1 parent 58fca71 commit e5286e1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions polaris-react/src/components/Button/Button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1416,6 +1416,13 @@
}
}

.Button.pressed {
#{$se23} & {
// stylelint-disable-next-line -- se23 required for styling specificicty
clip-path: none !important;
}
}

> :first-child .Button,
> :first-child .Button::after {
border-radius: 0;
Expand Down
5 changes: 5 additions & 0 deletions polaris-react/src/components/ButtonGroup/ButtonGroup.scss
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@
&:not(:first-child) {
margin-left: calc(-1 * var(--p-space-025));
}

// stylelint-disable-next-line -- se23 specific styling
+ .Item:not(.selected) > button {
clip-path: inset(0 0 0 var(--p-space-025));
}
}

.Item-focused {
Expand Down

0 comments on commit e5286e1

Please sign in to comment.