mdBook
mdBook copied to clipboard
Thin scrollbars in Chrome and Safari to make them less assertive
This PR thins scrollbars in Chrome and Safari to make them less assertive. This is part of #1483, but may not completely close the issue since this does not hide the scrollbars when unused.
I will appreciate your feedback! Many thanks.
How about to remove all the ::-webkit-scrollbar selectors as https://github.com/rust-lang/mdBook/issues/1483#issuecomment-1362451893 ?
@arniu Thank you for comments. Yes, it is another option I considered.
If making the scrollbar disappear when it is not needed is more important than the color, then removing the ::-webkit-scrollbar would be a good idea. On the other hand, if the project respect the current color scheme of the display, we could simply make it thinner.
I tried the latter for now, but I think the former approach is also good. It is a matter of what the project consider important.
I'm inclined to just remove the webkit scrollbar styling altogether. I don't think the color differences are too important, and I think it is worthwhile to stick with the OS and browser default behavior. There also may be accessibility concerns about making the scrollbar too narrow. I also don't see other projects styling the scrollbar. I think it would be fine to keep the Firefox coloring since it doesn't affect any other behavior on that browser.
@ehuss Thank you for comments.
Regarding the scrollbars, it looks like we are almost in agreement to remove the WebKit-specific style specification, so I have updated the PR to be in line with that. Could you please check it again?
My personal opinion is that it is better to respect browser and OS defaults as much as possible, so that conflicts are less likely to arise in the future when changes are made to the browser and OS defaults.