Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-anchor-position-1] position-try-options interaction with position-visibility #10341

Open
kbrilla opened this issue May 16, 2024 · 0 comments

Comments

@kbrilla
Copy link

kbrilla commented May 16, 2024

When exploring chrome blog describing https://developer.chrome.com/blog/anchor-positioning-api?hl=en i encountered that there is no support for using position-visibility with position-try-options or at least it does not work as one would expect.

For example:

  position-visibility: no-overflow;
  position-try-options: flip-block;

as I scroll I would expect
first flip to happen as soon as overflow would kick in then as overflow would kick in again for tooltip to be hidden.
so:
image
image
And now it should be hidden but stay visible
image
https://codepen.io/krzbri/pen/OJYymRv

and now

  position-visibility: no-overflow;
  position-try-options: flip-block;

here I would expect basically the same same behaviour with the exception that now we are talking about visibility of anchor.
What happens though is that as soon as top anchor is hidden it does not try to first try to use bottom anchor as position-try-options: flip-block; would suggest.
image
So here I would except to first switch to bottom anchor and only when this one is hidden for tooltip to be hidden.

https://codepen.io/krzbri/pen/jOobmmd

I found one similar issue but it seemd difrent enauch to open this one but linking it just in case: #10201

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

No branches or pull requests

1 participant