Closed joeuhren closed 10 months ago
@joeuhren Good day :)
I'm sorry you had this experience when upgrading OverlayScrollbars.. It was not supposed to be this way.
There is no upgrade guide, but in the changelog are listed all the changes from v1
to v2
: https://github.com/KingSora/OverlayScrollbars/blob/master/packages/overlayscrollbars/CHANGELOG.md#200
Funny enough the problem you had is not explicitly listed or explained in the changelog or anywhere else.. Thats because I somehow didn't think that this detail is so important since I personally try to avoid !important
rules and didn't think about anyone overwriting the styles of the plugin.
Thanks for posting your solution!
Hi, and thank you for the excellent scrollbar plugin that is OverlayScrollbars!
I'm writing to share with you that I recently had what I consider to be an unnecessarily difficult time upgrading from v1.13.3 to v2.3.2. Normally when upgrading these types of scripts it is common to have breaking changes which are usually well documented to prevent the types of pitfalls I fell into. I guess first of all, is there an upgrade guide of any kind to assist with moving from v1.x to v2.x? I couldn't find one. If there is one, I would strongly recommend putting that somewhere visible in the README and/or the documentation which already seems to cover all possible topics EXCEPT how to seamlessly upgrade.
Long story short, I discovered 2 separate css rules in my code that worked fine with v1 but broke v2. I had to strip down my code piece-by-piece to figure out what was wrong and in the end I got it down to such a basic level that I was able to easily put together some jsfiddles to demonstrate the issues which I hope will be helpful to others:
v1 test - WORKING v2 test - NOT WORKING
Both of the samples above use identical code except that the OverlayScrollbars scripts and definitions were swapped out for different versions + I added some text details in the html page about what I found to be wrong.
The 2 issues I stumbled upon were:
display: block
on the main scrollbar elementalign-items: center
on the main scrollbar elementI didn't do exhaustive testing to see if there were other css rules that were conflicting with these, but I wanted to point this out so that hopefully you can add them to an upgrade guide or maybe even some kind of Troubleshooting section of the documentation or README since these same issues could happen to someone who is starting directly with v2.x.
Feel free to close this issue as I got it working in the end. I only wanted to report what I had found in hopes that this info can be made more easily available since it can be overwhelmingly difficult to solve these types of problems in a mature project without knowing exactly what is wrong. Having a troubleshooting section or some kind of Common Problems section in the README or docs would be so helpful so that others can more quickly solve their own problems by checking for these types of incompatible css rules in their own projects.