Skip to content
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

Always show scrollbar #88

Open
vitaliemiron opened this issue Jun 19, 2020 · 9 comments
Open

Always show scrollbar #88

vitaliemiron opened this issue Jun 19, 2020 · 9 comments

Comments

@vitaliemiron
Copy link

Hi, is there any method to do scrollbar always visible ? (not only on hovering with mouse for macOs)

@rommguy
Copy link
Owner

rommguy commented Jun 19, 2020

Hi, sure, no problem -
You can override the css class rcs-custom-scrollbar with opacity:1 and the scrollbar will be visible always.
Notice that it appears above your content if your margin is too small. This is different from the native scrollbar that pushes the content to the side in some operating systems (like windows)

@rommguy rommguy closed this as completed Jun 19, 2020
@rommguy rommguy reopened this Jun 19, 2020
@rommguy
Copy link
Owner

rommguy commented Jun 19, 2020

@vitaliemiron please let me know if it worked

@vitaliemiron
Copy link
Author

@vitaliemiron please let me know if it worked

Yes, that worked, thank you!
Could you add param in js because exists some UX cases when scroll should be visible.

@rommguy
Copy link
Owner

rommguy commented Jun 19, 2020

Glad to hear.
About js param - sure, but I don't have a lot of free time for this open source, and there are other issues to solve before this.
If you can create a pull request with this change it would be great.

In the meantime, you can wrap this component with your own component that get the relevant react prop and sets the correct css according to that prop.

@promet99
Copy link

@rommguy
Hi, if this issue is still open and relevant, I can create a PR

@rommguy
Copy link
Owner

rommguy commented May 17, 2021

Sure @promet99 , no problem

@promet99
Copy link

I just started working on the code, and would like to point out that "opacity: 1;" had to be set for both .rcs-custom-scroll and .rcs-custom-scrollbar to work, as below, at least on my local. I wonder how @vitaliemiron solved it tho.

.rcs-custom-scroll .rcs-custom-scrollbar {
    opacity: 1;
}

@promet99
Copy link

@rommguy Hey I made a PR #103

@promet99
Copy link

@rommguy Ping!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants