Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(material-experimental/mdc-slide-toggle): missing focus indication in high contrast mode #17471

Merged
merged 1 commit into from
Oct 24, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/material-experimental/mdc-slide-toggle/slide-toggle.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
@import '@material/switch/functions';
@import '@material/switch/mixins';
@import '@material/switch/variables';
@import '@material/form-field/mixins';
@import '@material/ripple/variables';
@import '../mdc-helpers/mdc-helpers';
@import '../../material/core/style/layout-common';
@import '../../cdk/a11y/a11y';

@include mdc-switch-without-ripple($query: $mat-base-styles-query);
@include mdc-form-field-core-styles($query: $mat-base-styles-query);
Expand Down Expand Up @@ -51,3 +53,15 @@
}
}
}


@include cdk-high-contrast {
.mat-mdc-slide-toggle-focused {
.mdc-switch__track {
// Usually 1px would be enough, but MDC reduces the opacity on the
// element so we need to make this a bit more prominent.
outline: solid 2px;
outline-offset: $mdc-switch-track-height / 2;
}
}
}