@remotion/design: Remove box-content from Switch inner element#6941
Merged
JonnyBurger merged 1 commit intomainfrom Mar 31, 2026
Merged
@remotion/design: Remove box-content from Switch inner element#6941JonnyBurger merged 1 commit intomainfrom
@remotion/design: Remove box-content from Switch inner element#6941JonnyBurger merged 1 commit intomainfrom
Conversation
The inner slider circle used box-content which made its total rendered size 24x24 (20px content + 4px borders), filling the entire track with no visible gap. Removing it uses the default border-box from Tailwind's base reset, making the circle 20x20 total with symmetric 4px gaps. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
|
Reviewed PR #6941 — verified the box-sizing math is correct and the change produces symmetric 4px gaps around the toggle circle. No issues found, approved. Task list (4/4 completed)
|
3 tasks
Contributor
There was a problem hiding this comment.
Verified the math — with border-box, the 20x20 circle (including 2px borders) leaves symmetric 4px gaps on all sides within the track. The existing left/top position values and the active-state calc(100%-24px) are all correct for the new sizing. Clean fix.
Big Pickle (free) | 𝕏
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
box-contentwhich made its total rendered size 24x24 (20px content + 4px borders), filling the entire track height with no visible gapbox-contentso it uses the defaultborder-boxfrom Tailwind's base reset, making the circle 20x20 total with symmetric 4px gaps on all sidesleft-[4px]inactive,left-[calc(100%-24px)]active) produce correct symmetric spacing with border-boxTest plan
🤖 Generated with Claude Code