Skip to content

Commit 1a53f03

Browse files
crisbetojelbourn
authored andcommitted
fix(tabs): better high contrast indication on supported browsers (#18160)
We add an outline for focus indication in high contrast mode for tabs, but part of it gets clipped, because of `overflow: hidden`. These changes add a negative offset to ensure that it doesn't clip. Note that this isn't supported on IE, but it's a progressive enhncement for Edge and Firefox.
1 parent 26962a7 commit 1a53f03

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/material/tabs/_tabs-common.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ $mat-tab-animation-duration: 500ms !default;
2828
}
2929

3030
@include cdk-high-contrast {
31-
outline: dotted 2px;
31+
$outline-width: 2px;
32+
outline: dotted $outline-width;
33+
outline-offset: -$outline-width; // Not supported on IE, but looks better everywhere else.
3234
}
3335
}
3436

0 commit comments

Comments
 (0)