- From: Bramus via GitHub <noreply@w3.org>
- Date: Tue, 12 May 2026 07:46:24 +0000
- To: public-css-archive@w3.org
To me this is Working As Indented due to the application of styles that affect layout: because the dimensions of the stuck element change, the total scrollheight also changes, so stickypos is also affected and needs to recalc. This behavior is nothing new, and has been seen before with Scroll-Driven Animations (e.g. [crbug/40926369](https://crbug.com/40926369)) and layout-affecting `:hover` styles also causing a flicker (e.g. [demo](https://codepen.io/bramus/pen/vEyKdrj/895c11dd671853da20d7eb9b27c9c508)) _(In the case of [crbug/40926369](https://crbug.com/40926369), the solution was to switch the header from `position: sticky` to `position: fixed`)_ Another solution here is to wrap the text of the `h2`s in a `span`, and change the `span` when stuck. Quick demo: https://codepen.io/bramus/pen/RNoRQMy/976d62b55473f5a1cf33766eec3ae596 -- GitHub Notification of comment by bramus Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13898#issuecomment-4428387535 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 07:46:28 UTC