Skip to content
This repository was archived by the owner on Dec 6, 2022. It is now read-only.

Commit 1f218bf

Browse files
authored
Use CSS from focusHaloSpaced for ToggleSwitch focus styles (#1602)
1 parent c04aae3 commit 1f218bf

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

.changeset/twelve-carrots-buy.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@guardian/source-react-components-development-kitchen': patch
3+
---
4+
5+
Update focus styles for `ToggleSwitch`

packages/@guardian/source-react-components-development-kitchen/src/toggle-switch/styles.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,12 @@ export const toggleStyles = (format?: ArticleFormat): SerializedStyles => {
112112
background: ${neutral[100]};
113113
}
114114
115-
&:focus-visible {
116-
outline: 5px solid ${format ? neutral[100] : brand[500]};
117-
outline-offset: 3px;
115+
&:focus {
116+
outline: 0;
117+
html:not(.src-focus-disabled) & {
118+
outline: 5px solid ${format ? neutral[100] : brand[500]};
119+
outline-offset: 3px;
120+
}
118121
}
119122
`;
120123
};

0 commit comments

Comments
 (0)