From 47db12026d475317c73372c2c293d2cb7dd7cee7 Mon Sep 17 00:00:00 2001 From: GZolla <43836485+GZolla@users.noreply.github.com> Date: Fri, 7 Jul 2023 11:49:26 -0700 Subject: [PATCH] fix: remove z-index from switch --- components/switch/switch-mixin.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/components/switch/switch-mixin.js b/components/switch/switch-mixin.js index c70c54713e..e734283b3d 100644 --- a/components/switch/switch-mixin.js +++ b/components/switch/switch-mixin.js @@ -86,7 +86,6 @@ export const SwitchMixin = superclass => class extends FocusMixin(RtlMixin(super .d2l-switch-toggle { position: relative; transition: transform 150ms ease-out; - z-index: 1; } .d2l-switch-toggle > div { background-color: #ffffff; @@ -97,7 +96,7 @@ export const SwitchMixin = superclass => class extends FocusMixin(RtlMixin(super height: 1.1rem; left: -0.1rem; position: absolute; - top: -0.15rem; + top: -0.95rem; width: 1.1rem; } :host([on]) .d2l-switch-toggle > div { @@ -211,9 +210,9 @@ export const SwitchMixin = superclass => class extends FocusMixin(RtlMixin(super role="switch" tabindex="${ifDefined(tabindex)}">
-
${this.onIcon}
${this.offIcon}
+
${textPosition === 'end' || textPosition === 'hidden' ? switchLabel : ''}