This is a small utilitie that gives the possibility to mask fixed elements when you scroll over different element Live demo here.
This js utility helps you to seamlesly update fixed elements
npm i @michvh-dev/fixed-overfloww -S
yarn add @michvh-dev/fixed-overflow
import FixedOverflow from '@michvh-dev//fixed-overfloww';
const elements= document.querySelectorAll('.header, .sidebar');
new FixedOverflow({
element: elements,
});
// or
new FixedOverflow({
elementSelector: '.header, .sidebar',
});