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

xiaochengh has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-anchor-1] Preserve the previously used fallback position when all fallbacks fail ==
When all fallback positions fail, the current spec chooses the last fallback position.

This often causes a visual jump of the element when it's scrolled slightly out-of-screen. For example:
```
@position-fallback --pf {
  @try { top: anchor(bottom); }
  @try { bottom: anchor(top); }
}
```
We are currently using the first fallback, and keep scrolling down. When the element is slightly moved up out of the viewport, it suddenly jumps to the top of the anchor and becomes completely invisible. This is less desirable than keep using the first fallback.

So I'm proposing: When all fallback positions fail, try keep using the previously used fallback if there's any.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8200 using your GitHub account


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

Received on Wednesday, 7 December 2022 22:52:58 UTC