-
-
Notifications
You must be signed in to change notification settings - Fork 219
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
Feature: Cross browser styled scrollbars #492
Feature: Cross browser styled scrollbars #492
Conversation
Deploy request for musish pending review. Review with commit ee36897 |
Screenshots below. |
Adjust PageContent scrollbar margin to better fit new scrollbar corners
There is by default no option to offset scrollbars from their containers, which means no padding between the scrollbar and the edge of the CSS-container. |
Bump - @BrychanOdlum |
|
Thanks for testing the 3 browsers on macOS. I'm definitely not happy with the above look and I'm curious as to how both the color of and padding around the scrollbars are wrong. I will try to get my hands on a macOS computer so that I can fix these issues before merging. |
Okay, Chrome and Safari on macOS are now looking great! Only nitpick on these is that the page content's scrollbar is a tiny bit too wide compared to the default macOS style. Firefox, on the other hand, still doesn't seem to want to conform to the new rules though. Update: ideally on macOS it'd be great to have the scrollbar as the default 14px(?) wide, and when hovered over go to 22px(?). But, to be fair, the 18px(?) it seems to be now is a good middle ground. |
Okay, the plot thickens. It turns out Firefox on macOS does support So, I think this PR is as good as we're going to get unless we want to spend time changing the width of scrollbars on hover, which isn't really necessary... probably? |
Thanks all for the contribution 😁🚀 |
Replace all native-scrollbars with CSS-styled ones.
New scrollbars for:
Remove the class-specific scrollbar CSS properties and adds a single scrollbarWrapper class in common.scss.
Other SASS classes extend this class for its scrollbar-related properties.
This removes duplicate code and makes it easier to add custom scrollbar styling to future components.
Add CSS properties for styling Firefox scrollbars.
Previous properties were all for webkit-powered browsers.
Firefox only supports very basic scrollbar properties and thus no corner-radius styling is possible.
Make scrollbars slightly darker when pressed and held.
This adds visual feedback when scrolling by dragging the scrollbar.
Increase the thickness of the narrowest webkit-scrollbars from 3 to 4px.
I personally found the horizontal scrollbars on the For You and Browse pages difficult to click with a mouse and I still think they look good at 4px, while being a little more accessible.
Such are the perils of not using trackspads and magic mice ;-)
Screenshots here.
P.S.
I have only had the chance to test these changes in Firefox and Chromium, so please let me know if something doesn't look right in Safari.