mdBook
mdBook copied to clipboard
Scrollbars are weird in Safari

Can you say more what is "weird" about it?
They are always present in Safari.
The scroll bars:
- Are blocky instead of round
- Are far wider than normal
- Have the same background as the main content in the sidebar which looks incredibly janky
- Do not disappear when not scrolling
- Displace the context horizontally, messing up the alignment of the page (see red annotations)
Firefox

Safari

The visual weirdness of the scrollbars is super janky and off-putting, and this visual glitch is sufficient to make me not want to use mdBook. I'll see if I can make a minimal reproducible example or something later

Yeah, so deleting all the chrome CSS for ::-webkit-scrollbar
fixes the issue alright, but also has the effect of making the sidebar scrollbar appear darkened.
I had looked into this problem some time ago and found a solution to thin the scrollbars for the time being, so I sent a PR. However, this PR may not be a complete solution, since it does not turn off the scrollbars when they are not needed.
I just noticed the Jekyll theme Just the Docs (with the dark color theme) renders the side bar with a dark scroll bar—it appears this is the expected behavior for scroll areas within a page in Safari and not an issue that needs to be corrected.

@ehuss Do you have context on why the scrollbar styling was added originally? Thanks
Thanks @ehuss !