Commit 2db3c721 authored by Aryan Noshirvnai's avatar Aryan Noshirvnai

Fix Settings toggle switch thumb rendering outside the pill

The thumb span relied on left:auto + a translate-x offset for horizontal
position, but the <button>'s native text-align:center UA default (never
neutralized by an explicit left) made its auto-resolved static position
land near the pill's right edge in both checked states, so the translate
pushed it visibly outside the pill instead of sliding within it. Anchor
it with an explicit left-0.5 base position instead, matching the
standard Tailwind switch recipe, so position no longer depends on the
browser's static-position resolution for an auto-positioned box.
Co-Authored-By: 's avatarClaude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019i3NAUkLkHNbsPg5vKfzF9
parent b1407273
...@@ -77,8 +77,8 @@ function ToggleRow({ ...@@ -77,8 +77,8 @@ function ToggleRow({
}`} }`}
> >
<span <span
className={`absolute top-0.5 h-5 w-5 rounded-full bg-white shadow transition-transform ${ className={`absolute left-0.5 top-0.5 h-5 w-5 rounded-full bg-white shadow transition-transform ${
checked ? 'translate-x-[22px]' : 'translate-x-0.5' checked ? 'translate-x-5' : 'translate-x-0'
}`} }`}
/> />
</button> </button>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment