Skip to content

fix(material-experimental/mdc-slide-toggle): fix focus indictor position #19551

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

Merged
merged 1 commit into from
Jun 9, 2020
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
8 changes: 8 additions & 0 deletions src/material-experimental/mdc-slide-toggle/slide-toggle.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@
}
}

// The thumb-underlay element has `mat-mdc-focus-indicator` which sets
// a relative position. This element must have absolute positioning. This
// has increased specificity than the style set in MDC to guarantee that
// it will be absolutely positioned.
.mdc-switch__thumb-underlay {
position: absolute;
}

// The MDC switch styles related to the hover state are intertwined with the MDC ripple styles.
// We currently don't use the MDC ripple due to size concerns, therefore we need to add some
// additional styles to restore the hover state.
Expand Down