From fa67b5de47e38dc9f7d7cb8980025571e4c14ea5 Mon Sep 17 00:00:00 2001 From: Lan_zhijiang Date: Fri, 23 Oct 2026 14:40:53 +0800 Subject: [PATCH] fix(inkSwitch): remap size scale so md matches previous sm The md tier (100x36) was oversized relative to the 12px label font and surrounding form controls, which made the default switch read as 'large' in dense settings forms. Shift the scale down: md := 80x24 (old sm), lg := 100x36 (old md), sm := 64x24, base/xs := 48x20. Visually breaking for consumers that depended on the old md/lg rendered sizes. --- .changeset/ink-switch-size-scale.md | 5 +++++ .../web/src/components/inkSwitch/inkSwitch.scss | 16 +++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 .changeset/ink-switch-size-scale.md diff --git a/.changeset/ink-switch-size-scale.md b/.changeset/ink-switch-size-scale.md new file mode 100644 index 0000000..f4a3c45 --- /dev/null +++ b/.changeset/ink-switch-size-scale.md @@ -0,0 +1,5 @@ +--- +"@inkcre/ui-web": minor +--- + +Remap the InkSwitch size scale so `md` matches the previous `sm` dimensions (80x24), `lg` matches the previous `md` (100x36), and `sm` gets smaller (64x24). The base/xs tier shrinks to 48x20. This is a visual change for consumers relying on the old `md`/`lg` rendered sizes; the `md` default was oversized relative to the label font and surrounding form controls. diff --git a/packages/web/src/components/inkSwitch/inkSwitch.scss b/packages/web/src/components/inkSwitch/inkSwitch.scss index dfeba44..01673c8 100644 --- a/packages/web/src/components/inkSwitch/inkSwitch.scss +++ b/packages/web/src/components/inkSwitch/inkSwitch.scss @@ -5,8 +5,8 @@ grid-template-columns: repeat(2, 1fr); align-items: stretch; width: max-content; - min-width: 60px; - min-height: 24px; + min-width: 48px; + min-height: 20px; cursor: pointer; box-sizing: border-box; position: relative; @@ -46,16 +46,18 @@ font-size: 1em; } + // Smallest tier; the base styles above already apply. &--sm { - min-width: 80px; + min-width: 64px; + min-height: 24px; } &--md { - min-width: 100px; - min-height: 36px; + min-width: 80px; + min-height: 24px; } &--lg { - min-width: 120px; - min-height: 48px; + min-width: 100px; + min-height: 36px; } &:disabled {