fixed-sticky
fixed-sticky copied to clipboard
display: flex on parent element causes flicker
Has anyone else run into this? If the sticky element's parent is set to display:flex, the sticky element flickers on/off. I'll post a test case from codepen shortly.
I should qualify this. If the sticky element has flex: auto, then it's fine, but if no value is supplied, it seems to flicker.
Okay, after more digging, it appears the issue is actually due to the use of vh units in the element's padding.
I had this issue as well, but couldn't trace the issue to vh
or fix with flex: auto
. I was able to fix by adding backface-visibility: hidden
to the sticky element and everything within it.