Re: [csswg-drafts] [css-anchor-1] Preserve the previously used fallback position when all fallbacks fail (#8200)

> Is it acceptable to use the same RO-based timing

My first thought was to do it during layout, because otherwise the information (which fallback was chosen) isn't obvious from the rendering output.

> the memory is attached to the element rather than a box so it's preserved across a hide/show

SGTM. Same as anchor scroll's snapshotted scroll offset.

---

We also need to decide what exactly to remember.

I think we can just remember a fallback position index. That means the index can be out-of-range if the element's `position-fallback` value or the `@position-fallback` rule has changed, in which case we just ignore the remembered value and use the last fallback.

This also means we might end up using some arbitrary fallback after a `position-fallback` or `@position-fallback` change, but I don't think that's a very important case to fix. And I don't want to write any invalidation code for it...

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


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

Received on Thursday, 2 February 2023 02:25:06 UTC