Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(button): focus respects rounded corners #3726

Merged
merged 2 commits into from Sep 10, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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