Skip to content

Stop the tooltip sliding in from the window corner - #385

Merged
PatrikBak merged 1 commit into
mainfrom
patrik/tooltip-anchor-animation
Aug 22, 2026
Merged

Stop the tooltip sliding in from the window corner#385
PatrikBak merged 1 commit into
mainfrom
patrik/tooltip-anchor-animation

Conversation

@PatrikBak

Copy link
Copy Markdown
Owner

Tooltips visibly travelled from the top-left of the window to their anchor when they opened.

Tailwind v4 compiles duration-150 to both --tw-duration and a real transition-duration, and nothing resets transition-property, so it stays at its initial value of all. The floating element is positioned with inline top/left, which sit at 0,0 until floating-ui measures a frame later. The browser therefore transitioned the popover across the viewport. The enter keyframes only touch opacity, transform and filter, so the animation was never involved.

transition-none on the floating element makes the transition longhands inert, while duration-150 and ease-out still feed the enter animation through --tw-duration and --tw-ease.

Four other components pair animate-in with a bare duration-* and so carry the same live transition: all: Modal, ActiveFilterBar, NewsTimeline and DefenseTurn. None changes an inline geometric property on mount, so none misbehaves today, but the trap is identical and they get the same guard.

🤖 Generated with Claude Code

Tailwind v4 compiles duration-150 to both --tw-duration and a real
transition-duration, and nothing resets transition-property, so it stays
at its initial value of all. The tooltip is positioned with inline
top/left, which sit at 0,0 until floating-ui measures a frame later, so
the browser transitioned the popover across the viewport to its anchor.

transition-none on the floating element makes the transition longhands
inert while duration-150 and ease-out still feed the enter animation.

Four other components pair animate-in with a bare duration-*, so they
carry the same live transition: all. None changes an inline geometric
property on mount, so none misbehaves today, but the trap is identical
and they get the same guard.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 22, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
math-comps Ready Ready Preview Aug 22, 2026 4:23pm

@PatrikBak
PatrikBak enabled auto-merge August 22, 2026 16:22
@PatrikBak
PatrikBak merged commit 51cbefd into main Aug 22, 2026
5 checks passed
@PatrikBak
PatrikBak deleted the patrik/tooltip-anchor-animation branch August 22, 2026 16:28
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