Support for box-shadow
Hey @zzarcon love what you're doing here with this library.
Any chance there is a solution here that implements exactly what you have but for box-shadow instead of just a border?
I'm working on building a solution for this now, but was wondering if you or anybody else has done this.
If not I'm happy to work on it and open up a pull request
That would be amazing @adrielklein ! Please do so and let's see how can we get it merged here. Also, if you are interested I could make you maintainer afterwards 🤞
Hey @zzarcon, so after doing some tinkering, I've determined that it's pretty hard to get the box-shadow showing up properly using this library.
The reason for this is that box-shadow must be applied to the elements above and below the scroll area, not by inserting elements before and after the scroll area using css like you do in this library with ::before and ::after selectors.
However, i was able to implement a solution by creating a scroll handler on the scrollable element, then keeping track of when the user is at the top or bottom of scroll area. Then using that state, I was able to either apply or not apply a box-shadow to the surrounding elements. Also I put a css transition on box-shadow so it shows up smoothly.
I will try to find some time to create a CodeSandbox of my solution to give you a more concrete example of what I'm rambling about. From there I can see if there would be an easy way to integrate that into this library.
@zzarcon yes would be great to be a maintainer!