Skip to content

Commit

Permalink
fix(button): focus respects rounded corners (#3726)
Browse files Browse the repository at this point in the history
  • Loading branch information
sandgraham committed Sep 10, 2020
1 parent eede9e8 commit c4f1d58
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions src/button/styled-components.js
Expand Up @@ -34,21 +34,10 @@ export const BaseButton = styled<SharedStylePropsT>(
borderTopStyle: 'none',
borderRightStyle: 'none',
borderBottomStyle: 'none',
outline:
$isFocusVisible &&
$shape !== SHAPE.circle &&
$shape !== SHAPE.round &&
$shape !== SHAPE.pill
? `3px solid ${$theme.colors.accent}`
: 'none',
outlineOffset: '-3px',
boxShadow:
$isFocusVisible &&
($shape === SHAPE.circle ||
$shape === SHAPE.round ||
$shape === SHAPE.pill)
? `0 0 0 3px ${$theme.colors.accent}`
: 'none',
outline: 'none',
boxShadow: $isFocusVisible
? `inset 0 0 0 3px ${$theme.colors.accent}`
: 'none',
textDecoration: 'none',
WebkitAppearance: 'none',
transitionProperty: 'background',
Expand Down

1 comment on commit c4f1d58

@vercel
Copy link

@vercel vercel bot commented on c4f1d58 Sep 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.