--header-offset is slow on Safari with sticky elements (iPadOS 15.6)

This tends to be related to custom themes, but as you noted there are also cases like font-size that can impact the header height. In cases where the header is taller or shorter than default, we calculate the header-offset in JS to adjust other elements on the page so they’re not falling under the header.

Anyway, I can see the problem, this is definitely jarring:

but if I set --header-offset to a static value in CSS:

Maybe we’re calculating and updating the offset too often? We’ll do some investigation… Safari on iOS does a lot of optimization that might be causing issues.

4 Likes