From dc99c9b525687037921ac626affaa4eba2c303e9 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Tue, 3 Jan 2023 23:10:08 -0800 Subject: [PATCH] Fix positioning of thumb in switch We were using translateX to move the switch and animate it with transform, but the page refreshes immediately after you tap it so it doesn't matter. --- components/HeaderMenu/index.scss | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/components/HeaderMenu/index.scss b/components/HeaderMenu/index.scss index bbea705d..e5584f7f 100644 --- a/components/HeaderMenu/index.scss +++ b/components/HeaderMenu/index.scss @@ -88,8 +88,9 @@ display: block; height: $diameter; width: $diameter; - transition: transform 100ms; - transform: translateX(-2px); + position: absolute; + top: 3px; + left: 3px; z-index: 3; &:hover { @@ -98,7 +99,7 @@ &[data-state='checked'] { background: $grey-100; - transform: translateX(17px); + left: 23px; } }