Skip to content

fix(motion-collapsible): stop clipping once the height settles - #127

Merged
tmccoy14 merged 1 commit into
mainfrom
fix/collapsible-clips-focus-ring
Sep 1, 2026
Merged

fix(motion-collapsible): stop clipping once the height settles#127
tmccoy14 merged 1 commit into
mainfrom
fix/collapsible-clips-focus-ring

Conversation

@tmccoy14

@tmccoy14 tmccoy14 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

.motion-collapsible carried overflow: hidden at all times. The clipping is only needed while the height animates, and left on it cuts anything a child draws outside its content box — focus rings most visibly, since the ring is a box-shadow set 4px out from the trigger.

The result is a control inside a collapsible showing only the edges of its focus ring that happen to have padding above or beside them. In governance studio's API key dialog, the project select and the custom-expiry date picker both render a ring on the top edge alone, measured at 0px of room on the other three sides.

Clip only while the animation runs. Driving this from onAnimationStart / onAnimationComplete rather than isOpen also covers the ResizeObserver case, where content resizes while already open and starts a fresh height animation.

`.motion-collapsible` carried `overflow: hidden` at all times. The clipping is
only needed while the height animates, and left on it cuts anything a child
draws outside its content box — focus rings most visibly, since the ring is a
box-shadow set 4px out from the trigger.

The result is a control inside a collapsible showing only the edges of its
focus ring that happen to have padding above or beside them. In governance
studio's API key dialog, the project select and the custom-expiry date picker
both render a ring on the top edge alone, measured at 0px of room on the other
three sides.

Clip only while the animation runs. Driving this from onAnimationStart /
onAnimationComplete rather than `isOpen` also covers the ResizeObserver case,
where content resizes while already open and starts a fresh height animation.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@tmccoy14 tmccoy14 self-assigned this Sep 1, 2026
@tmccoy14
tmccoy14 merged commit 6c41a14 into main Sep 1, 2026
1 check passed
@tmccoy14
tmccoy14 deleted the fix/collapsible-clips-focus-ring branch September 1, 2026 13:43
@tmccoy14
tmccoy14 restored the fix/collapsible-clips-focus-ring branch September 1, 2026 13:59
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