fix: preserve shared switch dimensions

This commit is contained in:
lofyer
2026-08-11 20:14:16 +08:00
parent beb756bb2e
commit d8f1badad6
2 changed files with 9 additions and 0 deletions
@@ -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(
+3
View File
@@ -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;