The idea is to use IntersectionObserver to activate or not the top/bottom shadow for performance reason.
IntersectionObserver