Repository navigation
Conversation
- the bubble was absolutely positioned inside the trigger, so a closed tooltip still adds its width to every scroll ancestor - put the bubble and the arrow in `position: fixed` anchored to the trigger (`anchor-name`/`anchor-scope` on the trigger, `anchor()` insets per placement), so they no longer count toward the ancestor's scrollable overflow - `anchor-scope` is important - without it every bubble on the page resolves to the same trigger - so the new path is behind `@supports (anchor-scope: --tip)` and older browsers keep the current positioning - no `position-try-fallbacks`: the arrow is anchored to the trigger, so a flipped bubble would leave the arrow behind example: https://play.tailwindcss.com/mihDD377RQ closes saadeghi#4534 refs saadeghi#4610
pdanpdan
force-pushed
the
fix/tooltip-top-layer
branch
from
November 17, 2026 12:21
334380d to
0cc9847
Compare
- now both absolute and fixed positioning use the same ref point - use only variables to determine position - improve docs to explain custom variables example: https://play.tailwindcss.com/KtQjZgV2QV
This branch has not been deployed
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.
position: fixedanchored to the trigger (anchor-name/anchor-scopeon the trigger,anchor()insets per placement), so they no longer count toward the ancestor's scrollable overflowanchor-scopeis important - without it every bubble on the page resolves to the same trigger - so the new path is behind@supports (anchor-scope: --tip)and older browsers keep the current positioningposition-try-fallbacks: the arrow is anchored to the trigger, so a flipped bubble would leave the arrow behindexample:
v1:
https://play.tailwindcss.com/mihDD377RQv2: https://play.tailwindcss.com/KtQjZgV2QV - improve positioning, use only variables to keep all responsive
refs #4610, #4534