Skip to content

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

@kbrilla

Description

@kbrilla

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions