- From: Tab Atkins Jr. via GitHub <noreply@w3.org>
- Date: Tue, 12 May 2026 21:43:04 +0000
- To: public-css-archive@w3.org
On a well-written page (one with image sizes already written in, and no auto-loading ads of variable dimensions), scroll anchoring has minimal or no effect. It just tries to pick out the most "relevant" current-visible element on the page and keep it at the same relative visual position when its actual position in the scroller changes as a result of stuff elsewhere in the page shifting. So no, there's no downside to turning it off. However, this is just part of the cause. A top-sticky element, by luck, only shifts the content below it when it changes size; the edge it's actually stuck to remains stuck. A *bottom*-sticky element, on the other hand, will manifest the flickering even when scroll-anchoring is turned off, because becoming smaller shifts its own bottom edge upwards, making it no longer stuck. If you move all those headings to the end of their sections (and swap `top` for `bottom` both in the properties and the CQ), you'll still see them flicker in exactly the same way. <https://codepen.io/TabAtkins/pen/gbLwYLv> So the *actual* problem really is what I said at first, and I think the only way to fix it would be to have the stuck element remember its unstuck size and use that for the geometry it leaves behind. That would *also* happen to fix the top-stuck example without having to turn off scroll anchoring. -- GitHub Notification of comment by tabatkins Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13898#issuecomment-4435074188 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 12 May 2026 21:43:08 UTC