Skip to content

Commit 7cf0224

Browse files
committed
fix(button): macOS and iOS focus indication
1 parent d3ec3d2 commit 7cf0224

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/components/Button/Button.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ export const StyledButton = styled.button`
5757
outline: 2px solid transparent;
5858
outline-offset: -4px;
5959
`}
60-
&:focus:after {
61-
${focusOutline}
60+
&:focus:after, &:active:after {
61+
${!active && !isDisabled && focusOutline}
6262
outline-offset: -6px;
6363
}
6464
`
@@ -111,11 +111,13 @@ export const StyledButton = styled.button`
111111
&:active:before {
112112
${!isDisabled && createBorderStyles({ invert: true })}
113113
}
114-
&:focus:after {
115-
${focusOutline}
114+
&:focus:after,
115+
&:active:after {
116+
${!active && !isDisabled && focusOutline}
116117
outline-offset: -8px;
117118
}
118-
&:active:focus:after {
119+
&:active:focus:after,
120+
&:active:after {
119121
top: ${active ? '0' : '1px'};
120122
}
121123
`}

0 commit comments

Comments
 (0)