From 18272b3b47efc5877984788b51238321956c80b9 Mon Sep 17 00:00:00 2001 From: Rohan Chakraborty Date: Wed, 15 Apr 2026 01:53:26 +0530 Subject: [PATCH] fix(switch): replace hardcoded pixel widths with design token calc expressions Replace 34px and 26px hardcoded width values with calc() expressions using existing --rs-* spacing tokens, making the Switch component fully tokenized and consistent with the rest of the design system. - Large: calc(var(--rs-space-5) * 2 + var(--rs-space-1)) = 34px - Small: calc(var(--rs-space-4) * 2 + var(--rs-space-1)) = 26px Co-Authored-By: Claude Opus 4.6 (1M context) --- packages/raystack/components/switch/switch.module.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/raystack/components/switch/switch.module.css b/packages/raystack/components/switch/switch.module.css index d6ef022ef..204706330 100644 --- a/packages/raystack/components/switch/switch.module.css +++ b/packages/raystack/components/switch/switch.module.css @@ -12,12 +12,12 @@ } .switch.large { - width: 34px; + width: calc(var(--rs-space-5) * 2 + var(--rs-space-1)); height: var(--rs-space-6); } .switch.small { - width: 26px; + width: calc(var(--rs-space-4) * 2 + var(--rs-space-1)); height: var(--rs-space-5); }