From d8f1badad636c69463f51df98ad6c4e4bf06ec74 Mon Sep 17 00:00:00 2001 From: lofyer Date: Tue, 11 Aug 2026 20:14:16 +0800 Subject: [PATCH] fix: preserve shared switch dimensions --- src/renderer/src/WorkspacePrimitives.test.tsx | 6 ++++++ src/renderer/src/styles.css | 3 +++ 2 files changed, 9 insertions(+) diff --git a/src/renderer/src/WorkspacePrimitives.test.tsx b/src/renderer/src/WorkspacePrimitives.test.tsx index d33883a..722a9e9 100644 --- a/src/renderer/src/WorkspacePrimitives.test.tsx +++ b/src/renderer/src/WorkspacePrimitives.test.tsx @@ -122,6 +122,12 @@ describe('WorkspacePrimitives', () => { ) }) + it('keeps shared switches from inheriting text-field dimensions', () => { + expect(stylesheet).toMatch( + /\.toggle-row input\s*\{[^}]*min-width:\s*38px;[^}]*width:\s*38px;[^}]*min-height:\s*22px;[^}]*height:\s*22px;[^}]*margin:\s*0;/u + ) + }) + it('uses the design-system page gutters at each window width', () => { expect(stylesheet).toMatch(/--page-gutter:\s*32px;/u) expect(stylesheet).toMatch( diff --git a/src/renderer/src/styles.css b/src/renderer/src/styles.css index 242271c..6f6a2a5 100644 --- a/src/renderer/src/styles.css +++ b/src/renderer/src/styles.css @@ -6034,8 +6034,11 @@ details.settings-section > :not(summary) + :not(summary) { .toggle-row input { position: relative; + min-width: 38px; width: 38px; + min-height: 22px; height: 22px; + margin: 0; padding: 0; border: 1px solid var(--border-control); border-radius: 999px;