Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/ink-switch-size-scale.md
Original file line number Diff line number Diff line change
@@ -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.
16 changes: 9 additions & 7 deletions packages/web/src/components/inkSwitch/inkSwitch.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 {
Expand Down
Loading