Use IntersectionObserver instead of scroll event
The idea is to use IntersectionObserver
to activate or not the top/bottom shadow for performance reason.
The idea is to use IntersectionObserver
to activate or not the top/bottom shadow for performance reason.