6 ms·
Please do not make your own fancy scrollbars with JavaScript. I already have a scrollbar in my browser, I most certainly do not need yours!
by insertnickname 11y ago
Please do not make your own fancy scrollbars with JavaScript. I already have a scrollbar in my browser, I most certainly do not need yours!
- LoSboccacc 11y agoBrowser scrollbars sucks tho.
- monochromatic 11y agoBrowser scroll bars are perfectly fine. This is a solved problem. It doesn't need to be re-solved in a thousand different ways.
- Mithaldu 11y agoNow, many people downvote you, but i am honestly curious. What are the specific downsides browser scrollbars have? And, if it does, how does the JS implementation on that website improve on them?
- madeofpalk 11y agoIt's not just browser scrollbar - its the OS scrollbar.
- Mithaldu 11y agoYeeees? Go on?
- clort 11y agoSo by the way, this is the OS that I run on my computer and it provides the scrollbars that I like. If I don't like them I can change the window manager (and I run X11 so yes, I can do that) to something that I do like. The designer of that, or any, website does not know what I like, or what works for me and best suits my abilities. They should certainly not attempt to change it based on what they want and what suits them on their device. actually, I'm a bit flabbergasted when this kind of thing happens, I really am not sure why I would want to allow any application (much less a page on a computer the other side of the world being shown by that application) to change the way my computer interfaces with me.
- madeofpalk 11y agoDon't change basic OS behaviour.
- LoSboccacc 11y agoThey take a load of space, they look like a leftover from the nineties, they take different space on every browser so if you want a precise layout positioning you can't, they don't reliably report positions or events, they can't be reliably scrolled at a specific relative position on every browser and more. I'm fine with the downvotes, people around here downvote to disagree even if they don't actually know what suffering and misery cross browser development is.
- Mithaldu 11y agoYou're getting downvoted because your complaints are either rather vague (doesn't measuring viewport size exclude scrollbar size, so their size is irrelevant to you?) and indicate a desire to mess around with what is very much not yours to mess around with (size, styling, position of scrollbars) which simply means you don't respect your users.
- LoSboccacc 11y agothat's a load of work for some fake internet point. and no on some browser the scrollbars consume layout space and on some they don't. (remember to add the ios/safari monstrosities into the mix) heck, just open this http://www.matanich.com/test/viewport-width/ http://www.matanich.com/test/viewport-width/ on edge/ie11/chrome and see yourself how reliable clientWidth is (especially test edge fullscreen vs edge windowed but fullscreen it will blow your mind)
- hueving 11y agoSo your answer is to make the user experience miserable because you don't like doing work?
- Mithaldu 11y agoAlright, so some browsers like Edge will report the full screen width available even with scrollbar visible, because it fades out the bar after a while. You could've just said that. That is understandable as a reason. Although i still think it's a pretty bad reason to use to force "smoOoOo--oOoth" scroll on everyone, instead of only browsers that are known to be broken.
- scrollaway 11y agoScrolling has OS/browser-specific behaviour that is dependent on user configuration. Read that as, "it takes your own preferences into account". For example as I mentioned above, I despise smooth scrolling and this website is forcing it on me.
- detaro 11y agoThey suck less than what this page does. I couldn't tell you if all pages that do scrolling themselves are annoying, because I probably wouldn't notice a good example, but I can tell you that many of the pages that do do because they do something to scrolling that's not as intended. If your custom scrolling feels noticeably different or breaks a feature, it's broken. And honestly, I doubt many developers are able to build a reliable, cross-browser, non-broken implementation.
- LoSboccacc 11y agohttp://jscrollpane.kelvinluck.com http://jscrollpane.kelvinluck.com here, I don't know what that guy uses but this is a good implementation
- detaro 11y agoIt is certainly better (because it doesn't mess with the way scrolling feels), but also isn't bug free: the scrollbars partly cover text, middle-click-scrolling is broken and according to the bugtracker there are issues with iOS.
- deleted 11y ago[deleted]
- scrollaway 11y agoIndeed... no better way to piss me off and detract from a good article than by forcing smooth scrolling on me when I specifically disable it...
- thomasahle 11y agoIt doesn't just have smooth scrolling, it's some kind of super slowly deaccelerating scroll, that makes it impossible to go to any specific place in the page.
- MereInterest 11y agoNot just that, but the floating header takes up a full 210 pixels, leaving little room for the article.
- devgutt 11y agoI think there is a problem in this article. In other articles, the header contracts to 48 pixels.
- MereInterest 11y agoWhich is better, but still 48 pixels bigger than it should be.
- nissehulth 11y agoA nice side effect from using NoScript is that pages appear more in the way the "web developer" Tim Berners-Lee intended. :)
- tim333 11y agoIndeed. Also Ghostly had removed the iffy scrolling for me. I had to turn it off to check it out in all its glory.
- yoodenvranx 11y agoI hate when websites fuck around with my middle mouse button, the scrolling behavior of the page and the scroll bars. Also those navbars should be eliminated from all webpages, especially if you are on mobile.
- Kiro 11y agoIf you don't like my scrollbars you don't need to visit my site.
- ris 11y agoBye then!
- TazeTSchnitzel 11y agoYou've been able to style the scrollbar with CSS for years now. JS lets you control the positioning of the scrollbar. There's no excuse for recreating it.
- insertnickname 11y agoThere's no excuse for styling scrollbars.