I'm trying to apply custom styles to the scrollbars (actually, trying to make scrollbars always visible) and preserve the momentum scrolling for the iOS app:
#container {
height: 400px;
overflow: scroll;
-webkit-overflow-scrolling: touch;
}
#container::-webkit-scrollbar {
-webkit-appearance: none;
background-color: #000;
}
#container::-webkit-scrollbar:horizontal {
height: 6px;
}
#container::-webkit-scrollbar-thumb {
background-color: #000;
}
#container::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
background-color: #333;
}
But -webkit-overflow-scrolling: touch
and ::-webkit-scrollbar
styles don't work together.
There's already a related question on StackOverflow:
-webkit-overflow-scrolling: touch breaks my -webkit-scrollbar css in iOS
So, from the height of spring'2016, is there any way to have a momentum scrolling while styling the scrollbars at the same time? I'm ready to ditch the -WebKit-overflow-scrolling: touch
if there's another method that can fake it.
Please don't suggest using niceScroll, iScroll, etc. - I've tried these; actually, I'm currently using one of such scripts and want to get away from it.