From 760a7b02f78f7b419de0393313c3cb7820bd1820 Mon Sep 17 00:00:00 2001 From: FireIsGood Date: Sun, 25 Feb 2024 02:53:50 -0800 Subject: [PATCH] fix: inconsistent enabled switch state Fixes the switch state by making it offset correctly instead of ballpark with the wrong units --- scss/forms/_checkbox-radio-switch.scss | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scss/forms/_checkbox-radio-switch.scss b/scss/forms/_checkbox-radio-switch.scss index 2328e818..0bc7ed2a 100644 --- a/scss/forms/_checkbox-radio-switch.scss +++ b/scss/forms/_checkbox-radio-switch.scss @@ -126,7 +126,9 @@ background-image: none; &::before { - margin-inline-start: calc(#{$switch-width * 0.5} - var(#{$css-var-prefix}border-width)); + margin-inline-start: calc( + #{$switch-width} - #{$switch-height} / 2 - var(#{$css-var-prefix}border-width) * 3 + ); } }