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
Place of scroll track #38
Comments
Good day! - There was an issue similar to yours: #17 Basically it is possible and the plugin doesn't require the scrollbars to be inside. The problem is the managment of the scrollbars. Personally I think this feature isn't necessary since the plugin gives you enough freedom to customize the padding to the content and the scrollbars. It's only a matter of how you take advantage of it. A demo where it just looks like the scrollbars are outside: https://jsfiddle.net/bedam73j/ If you compare them side by side (and ignore that I set a different background color of the |
I'll close this issue. If you have any other questions related to this topic or if this problem isn't solved by my answer please feel free to reopen. |
@KingSora Have you overcomed this issue in the latest version ? If it is ..kindly tell me how to implement it. |
@sujith-sairam Yes, in You can do that by defining a scrollbars slot in the initialization: OverlayScrollbars({
target: document.querySelector('#target'),
scrollbars: {
slot: document.querySelector('#scrollbarsSlot'),
},
}, {}); Or you can just move the generated scrollbars after the initialization to your desired container(s): OverlayScrollbars(document.querySelector('#target'), {}, {
initialized: (osInstance) => {
const { scrollbarHorizontal, scrollbarVertical } = osInstance.elements();
document.querySelector('#scrollbarHorizontalSlot').append(scrollbarHorizontal.scrollbar);
document.querySelector('#scrollbarVerticalSlot').append(scrollbarVertical.scrollbar);
// you could even clone scrollbars:
const clonedScrollbarHorizontal = scrollbarHorizontal.clone();
document.querySelector('#scrollbarHorizontalSlot').append(clonedScrollbarHorizontal.scrollbar);
}
}); |
@sujith-sairam The docs for |
@KingSora .os-host-scrolling class name in styling is not available in v2 , i need to perform an styling action while scrolling ,is there any way to achieve it ?? |
@sujith-sairam You can add any class in the Please open an discussion or a new issue if you have further questions... |
Is it possible to put the scroll bars on the outside of the container? Quite often I require the scroll content to be laid out exactly as is but nicely scrollable, but with OverlayScrollbars, it often places the scrollbar over the content.
The text was updated successfully, but these errors were encountered: