-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for box-shadow #10
Comments
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! |
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?
The text was updated successfully, but these errors were encountered: