-
-
Notifications
You must be signed in to change notification settings - Fork 363
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
Better scrollbars for desktop browsers #153
Conversation
Those scrollbars are terrible. Thanks for fixing them. Will take a closer look at it next week 😊 |
macOS/iOS only shows scrollbars when necessary. Custom styles force show the scrollbars making them always visible. That doesn't look good on Apple devices. I guess that the only way to fix this is to detect Windows, add a class to the html/body and then apply the custom styles: https://stackoverflow.com/questions/8493589/is-there-a-css-media-query-to-detect-windows/8494351 |
Oof, I was hoping Safari would still maintain his hiding behavior as it's just styling... well then, it's hard for me to test on, don't have the device, but I feel like it's easier to detect just Safari (or apple devices) instead of Windows, Linux and the other distros. Before going the JavaScript path, i will try something else with CSS, will keep you updated on this PR if i ever find any alternative solution. Maybe something like:
@electerious do the always visible behavior also happens on iOS? It hides normally on my Android. |
For the JS solution, the below code should do (if it's a Mac only thing), just not sure where I put it. 😅
|
Info: The PR is still on my list, but I'm not sure when I have the time to implement it. Will do it like you suggested, but using a class added via JS. |
It's on the develop branch. Please let me know if it's working because I can't test it on Windows! I've ended up using the following JS: useEffect(() => {
const isWindows = navigator.platform.includes('Win') === true
if (isWindows === false) return
// Use custom scrollbars on Windows because they look ugly
document.body.classList.add('customScrollbar')
return () => document.body.classList.remove('customScrollbar')
}, []) and CSS: .customScrollbar {
$size: 6px;
::-webkit-scrollbar {
width: $size;
height: $size;
z-index: 1000;
}
::-webkit-scrollbar-track {
background: transparent;
}
::-webkit-scrollbar-thumb {
background-color: rgba(255, 255, 255, .5);
border-radius: $size/2;
}
::-webkit-scrollbar-corner {
display: none;
}
* {
scrollbar-width: thin;
scrollbar-color: rgba(255, 255, 255, .5) transparent;
}
} |
For some reason, I can't deploy the develop branch on Heroku. Have tried different ways of doing it. Cloning, CLI, Heroku Button + changing to develop... this is really weird because I'm using the exactly same ENV VARS of my last test... Also, the Master Branch still builds normally, so I think something may have broke Heroku. Regard the code, it looks good. 👍 I will see if I made some error on the process, but I don't believe so, it would be nice if someone could also test this. |
No problem! Just let me know when you get the same issue on master after the merge. Will do so this weekend. |
Had the same issue. The Docker build was broken because the dist folder was part of the |
Add better UI style for scrollbars on Chromium and Firefox based browser. For Firefox:
can also be made, avoiding the "*" selector, but I'm not sure if these are all the elements that use scrollbars, there is also the option of creating an entire new class just for scrollbars.
Here some images taken on Windows 10, OLD ➡️ NEW.