mdBook icon indicating copy to clipboard operation
mdBook copied to clipboard

Thin scrollbars in Chrome and Safari to make them less assertive

Open noritada opened this issue 2 years ago • 2 comments

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.

noritada avatar Dec 22 '22 06:12 noritada

How about to remove all the ::-webkit-scrollbar selectors as https://github.com/rust-lang/mdBook/issues/1483#issuecomment-1362451893 ?

arniu avatar Dec 23 '22 02:12 arniu

@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.

noritada avatar Dec 23 '22 13:12 noritada

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 avatar Jan 14 '23 23:01 ehuss

@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.

noritada avatar Jan 18 '23 15:01 noritada