We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 26c73e0 commit 30dd524Copy full SHA for 30dd524
src/lib/slide-toggle/slide-toggle.scss
@@ -240,6 +240,14 @@ $mat-slide-toggle-bar-track-width: $mat-slide-toggle-bar-width - $mat-slide-togg
240
241
.mat-slide-toggle-bar {
242
background: #fff;
243
+
244
+ // As a focus indication in high contrast mode, we add a dotted outline to the slide-toggle
245
+ // bar. Since the bar element does not have any padding, we need to specify an outline offset
246
+ // because otherwise the opaque thumb element will hide the outline.
247
+ .mat-slide-toggle.cdk-keyboard-focused & {
248
+ outline: 1px dotted;
249
+ outline-offset: ($mat-slide-toggle-height - $mat-slide-toggle-bar-height) / 2;
250
+ }
251
}
252
253
0 commit comments