Skip to content

fix(switch): replace hardcoded pixel widths with design token expressions#737

Open
rohanchkrabrty wants to merge 1 commit intomainfrom
fix/641-switch-hardcoded-pixels
Open

fix(switch): replace hardcoded pixel widths with design token expressions#737
rohanchkrabrty wants to merge 1 commit intomainfrom
fix/641-switch-hardcoded-pixels

Conversation

@rohanchkrabrty
Copy link
Copy Markdown
Contributor

Summary

  • Replace hardcoded 34px and 26px width values in Switch component CSS with calc() expressions using existing --rs-* spacing tokens
  • Large switch: calc(var(--rs-space-5) * 2 + var(--rs-space-1)) (= 34px)
  • Small switch: calc(var(--rs-space-4) * 2 + var(--rs-space-1)) (= 26px)

Test plan

  • All 1619 existing tests pass
  • Visual output unchanged (values are mathematically equivalent)
  • Verify Switch renders correctly in browser at both sizes

🤖 Generated with Claude Code

…pressions

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) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
apsara Ready Ready Preview, Comment Apr 14, 2026 8:25pm

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 14, 2026

Warning

Rate limit exceeded

@rohanchkrabrty has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 51 minutes and 26 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 51 minutes and 26 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: acb2e53c-042f-4417-8bd6-6f8ead4c3745

📥 Commits

Reviewing files that changed from the base of the PR and between 26e02f6 and 18272b3.

📒 Files selected for processing (1)
  • packages/raystack/components/switch/switch.module.css

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant