From 9380b8fa021da49a4e78b5fbe9ca5a5623991e44 Mon Sep 17 00:00:00 2001 From: andrewseguin Date: Fri, 5 Jun 2020 14:33:41 -0700 Subject: [PATCH] fix(material-experimental/slide-toggle): fix focus indictor position --- .../mdc-slide-toggle/slide-toggle.scss | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/material-experimental/mdc-slide-toggle/slide-toggle.scss b/src/material-experimental/mdc-slide-toggle/slide-toggle.scss index 6442e84c4789..ed89e7390b4d 100644 --- a/src/material-experimental/mdc-slide-toggle/slide-toggle.scss +++ b/src/material-experimental/mdc-slide-toggle/slide-toggle.scss @@ -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.