Re: [csswg-drafts] [css-anchor-position-1] Allow having a snapshotted scroll offset without using `anchor()` (#9239)

Further feedback from the [Chrome bug reporter](https://bugs.chromium.org/p/chromium/issues/detail?id=1473388#c5):

> Image a footnote popup that’s fixed-position against the bottom of the viewport, but anchored to one or both sides of an anchoring element.  If I understood what you said there in https://bugs.chromium.org/p/chromium/issues/detail?id=1473388#c4, there would be no way to anchor one or more edges of an element while having it be fixed-positioned along a different edge.  This breaks my use case, which I like to think is legit.

So this use case requires us to track the scroll position of the anchor in one axis but not the other, which gets the issue even more complicated.

As a result, we not only need to keep this condition, generalize it to work with `anchor-center`, but also have to make it axis-aware: for each axis, there's a snapshotted scroll offset in that axis if there's any reference to the anchor's location (via `anchor()`, `anchor-center` or anything we add in the future) in the same axis in the used style (i.e., after position fallback applied).

It's getting quite complicated, but I don't see any other way to make it work.

Btw, compared to this, I'm still not a fan of reviving the `anchor-scroll` property, because it's still unnecessarily exposing technical details.

-- 
GitHub Notification of comment by xiaochengh
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9239#issuecomment-1694009908 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 25 August 2023 22:47:30 UTC