From b79d13bcc894614311756760efabedfd1d512072 Mon Sep 17 00:00:00 2001 From: hwangdev97 <24713927+hwangdev97@users.noreply.github.com> Date: Thu, 4 Jul 2024 04:20:47 +0000 Subject: [PATCH] fix: switch style: remove border and shadow (#7423) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - remove border and shadow - fix position before 👇 ![shot-2024-07-04-11 55 38@2x](https://github.com/toeverything/AFFiNE/assets/24713927/81776294-1cb3-49a9-b6d6-bd800c91b847) after 👇 ![shot-2024-07-04-12 01 20@2x](https://github.com/toeverything/AFFiNE/assets/24713927/812d4567-9c17-4c14-af4f-6eba97f077da) --- packages/frontend/component/src/ui/switch/index.css.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/frontend/component/src/ui/switch/index.css.ts b/packages/frontend/component/src/ui/switch/index.css.ts index 5a6c8a48bb..1c6b70212a 100644 --- a/packages/frontend/component/src/ui/switch/index.css.ts +++ b/packages/frontend/component/src/ui/switch/index.css.ts @@ -17,8 +17,6 @@ export const switchStyle = style({ background: cssVar('toggleDisableBackgroundColor'), borderRadius: '37px', transition: '200ms all', - border: `1px solid ${cssVar('black10')}`, - boxShadow: cssVar('toggleCircleShadow'), selectors: { '&:before': { transition: 'all .2s cubic-bezier(0.27, 0.2, 0.25, 1.51)', @@ -28,9 +26,8 @@ export const switchStyle = style({ height: '20px', borderRadius: '50%', top: '50%', - border: `1px solid ${cssVar('black10')}`, background: cssVar('toggleCircleBackgroundColor'), - transform: 'translate(1px, -50%)', + transform: 'translate(3px, -50%)', }, }, }); @@ -39,7 +36,7 @@ export const switchCheckedStyle = style({ selectors: { '&:before': { borderColor: cssVar('pureBlack10'), - transform: 'translate(21px,-50%)', + transform: 'translate(23px,-50%)', }, }, });