I suggest to use this with a feature query, @supports (position: sticky). With feature query if you want to offset the sticky point, like top: 20px, it will only apply the top value to the element if position: sticky is supported.
@supports (position: sticky)
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.