Skip to content

Commit

Permalink
fix(button): macOS and iOS focus indication
Browse files Browse the repository at this point in the history
  • Loading branch information
arturbien committed Mar 29, 2020
1 parent d3ec3d2 commit 7cf0224
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/components/Button/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ export const StyledButton = styled.button`
outline: 2px solid transparent;
outline-offset: -4px;
`}
&:focus:after {
${focusOutline}
&:focus:after, &:active:after {
${!active && !isDisabled && focusOutline}
outline-offset: -6px;
}
`
Expand Down Expand Up @@ -111,11 +111,13 @@ export const StyledButton = styled.button`
&:active:before {
${!isDisabled && createBorderStyles({ invert: true })}
}
&:focus:after {
${focusOutline}
&:focus:after,
&:active:after {
${!active && !isDisabled && focusOutline}
outline-offset: -8px;
}
&:active:focus:after {
&:active:focus:after,
&:active:after {
top: ${active ? '0' : '1px'};
}
`}
Expand Down

0 comments on commit 7cf0224

Please sign in to comment.