noeldelgado / gemini-scrollbar

:first_quarter_moon: Custom overlay-scrollbars with native scrolling mechanism for web applications
https://noeldelgado.github.io/gemini-scrollbar/
MIT License
428 stars 63 forks source link

OS X - showing custom scrollbars even when having overlayed ones natively #1

Closed noeldelgado closed 9 years ago

noeldelgado commented 9 years ago

On Mac OS X 10.10.2, if you have Preferences/General Show Scrollbar: Only when Scrolling the lib will create custom scrollbars but, it should NOT.

I was diggin' the issue, it was added by this commit. On that commit I was trying to solve an issue when ::-webkit-scrollbar was declared with either a width or an explicit height value, that was causing the scrollbarWidth fn check to return a value greater than zero even when the OS has native overlay-scrollbars. So, by reseting the ::-webkit-scrollbar width property to its initial value on the scroll-width fn test, it was (at least) working fine for iOS but not for OS X.

In order to “close” this for now, I am removing the .gm-test::-webkit-scrollbar { width: initial; } declaration I had just for the scrollbarWidth fn test and point to the commit fixing this issue on the readme, recommending to remove any webkit scrollbar pseudo-elements you may have from your CSS. That will solve the issue for iOS and OS X as well. Anyway, why would someone want to have custom css scrollbars when using this lib...