From c7f25e8fe3e4489f364f6d1c095d2f0a508dddd2 Mon Sep 17 00:00:00 2001 From: JimmFly Date: Tue, 27 Jun 2023 22:15:34 +0800 Subject: [PATCH] fix: incorrect scrollbar position when opening full width layout (#2869) Co-authored-by: Alex Yang --- apps/web/src/components/page-detail-editor.css.ts | 4 +--- packages/component/src/ui/switch/index.css.ts | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/apps/web/src/components/page-detail-editor.css.ts b/apps/web/src/components/page-detail-editor.css.ts index 9c1045cce7..332e0ca02c 100644 --- a/apps/web/src/components/page-detail-editor.css.ts +++ b/apps/web/src/components/page-detail-editor.css.ts @@ -7,12 +7,10 @@ export const pluginContainer = style({ export const editor = style({ height: 'calc(100% - 52px)', - selectors: { '&.full-screen': { - padding: '0 5%', vars: { - '--affine-editor-width': '100%', + '--affine-editor-width': '90%', }, }, }, diff --git a/packages/component/src/ui/switch/index.css.ts b/packages/component/src/ui/switch/index.css.ts index 9621c69e9a..457a32a768 100644 --- a/packages/component/src/ui/switch/index.css.ts +++ b/packages/component/src/ui/switch/index.css.ts @@ -40,7 +40,7 @@ export const switchCheckedStyle = style({ selectors: { '&:before': { background: 'var(--affine-toggle-circle-background-color)', - transform: 'translate(100%,-50%)', + transform: 'translate(21px,-50%)', }, }, });