Live data from Hacker News

Don't use custom CSS scrollbars

ericwbailey.website

151–160 of 250 posts

Re: Don't use custom CSS scrollbars

#151
post #30

On the contrary, I'm completely in favor of custom CSS scrollbars because it's unimaginable that websites could do worse than modern OSes already do when it comes to scrollbars. If anyone here has a time machine, immediately after you've finished killing Hitler may I recommend that you gently persuade Jony Ive away from the terrible decision to make scrollbars hidden, low contrast, and impossibly thin.

Personally, I like the Apple ones. I’m partially sighted, so I should probably want the stronger visual design, but I don’t.

What I prefer is consistency with the OS. My OS is my main tool for interacting with the digital realm. My life would be easier if the conventions were more evenly applied. Custom scrollbars concern me that my OS defaults are being overriden: will the field scroll at the expected speed; can I flick it and catch it as I’m used to; is the scale expressive of content size?

Custom scrollbars tell me that the developer doesn’t care about me, they care more about their brand manager and their pay check. This suggests the product they represent wont suit me.

Along with intrusive pop-ups, subscription overlays, and “we value your privacy”, it’s a clear sign I should not engage with that provder.

Re: Don't use custom CSS scrollbars

#152

Earlier quoted context omitted.

First of all, the OS does not style widgets, the browser does. And scrollbars are completely different in different browsers - they have different sizes, different behavior, different look-and-feels. So either you create versions of your app which match each browser individually, or you re-style the scrollbars to look the same as the rest of the app. Thirdly, there is an obvious counter to your arguments that shows t…

> And scrollbars are completely different in different browsers - they have different sizes, different behavior, different look-and-feels. Yes, and? No matter what it is, it's what the users of said platform are used to. Is there really a benefit to forcing users to re-learn such a critical component? > You wouldn't expect a game to use the system look-and-feel, it rightfully uses a look-and-feel that matches the gam…

My point was that a general "no app shall customize scrollbar look and feel" is wrong, as there are certain kinds of apps that do benefit from custom look and feel. Sure, not all games, but also games are not so entirely different from other kinds of apps.

Also, I thought the specific points about CSS and how to achieve custom styling if desired are irrelevant. The arguments I was replying to were about UX, not about details of how that is implemented.

Re: Don't use custom CSS scrollbars

#153

Earlier quoted context omitted.

First of all, the OS does not style widgets, the browser does. And scrollbars are completely different in different browsers - they have different sizes, different behavior, different look-and-feels. So either you create versions of your app which match each browser individually, or you re-style the scrollbars to look the same as the rest of the app. Thirdly, there is an obvious counter to your arguments that shows t…

MacOS and iOS scrollbars are the same in every app and browser. They are styled by the OS, even in iOS games.

Perhaps, but MacOS and iOS are not the only OSs out there. Also, full screen iOS games have full control of the screen and I/O, and can choose to draw anything they want and implement any interaction they want, they don't have to rely on the system to draw widgets for them.

Re: Don't use custom CSS scrollbars

#154
post #137

Earlier quoted context omitted.

First of all, the OS does not style widgets, the browser does. And scrollbars are completely different in different browsers - they have different sizes, different behavior, different look-and-feels. So either you create versions of your app which match each browser individually, or you re-style the scrollbars to look the same as the rest of the app. Thirdly, there is an obvious counter to your arguments that shows t…

I believe the point is that if you're unhappy with the default scrollbar, you should get rid of it altogether rather than torture it into doing something it's not meant to do. Having done e.g. an endless scroll application, the scrollbar was unfit for our use, no matter what we did. The right solution was to remove scrollbar and implement our own scrolling mechanism.

The GP was specifically complaining about apps not respecting their scrollbar choices. They said that apps should defer all scrolling UX to the OS, as that is what the user chose.

Re: Don't use custom CSS scrollbars

#155
post #116

Earlier quoted context omitted.

That's repeating the same mistake - trying to force one generic principle onto every situation. Opt-in can solve that - only users that don't get surprised by a lack of useless elements can remove them

Not a mistake. At worse a tradeoff. Hiding a scroll bar when you go below some arbitrary document height that would classically warrant a scroll bar is just confusing. People who use a mouse to scroll will not know what to do and assume there is a bug. And sometimes you want scrollbar level control even on a short document. It is not forcing them to use the scrollbar: keyboard shortcuts and menu items should still wo…

> Hiding a scroll bar when you go below some arbitrary document height that would classically warrant a scroll bar is just confusing.

No it's not because you OPT INTO this feature and could change the document height from arbitrary to a threshold where using your wheel is uncomfortable (and that would depend on your device, e.g., with infinite Logitech scroll wheel that length is much bigger since it's very easy to scroll large distances)

> People who use a mouse to scroll will not know what to do and assume there is a bug.

No they won't because they'd OPT INTO this feature

> And sometimes you want scrollbar level control even on a short document

I never do, but then there are also solutions for this that don't involve some narrow understanding of the principle of least surprise

> It is not forcing them to use the scrollbar

But it is forcing them to clutter UI/waste space by not allowing to hide the scrollbar in most frequent use cases

Re: Don't use custom CSS scrollbars

#156
I largely agree, but the one thing I have been wanting to do sometimes is too be able to put marks/indicators on the scrollbar of where important pieces of information is in the flow.

A lot like chrome does when you use ctrl+f to search for a word.

Re: Don't use custom CSS scrollbars

#157
post #41

I recognize that web developers want full control over the user experience, usually to the point of reimplementing all of the native UI widgets provided by the user’s OS. As a user, I prefer for my OS to do things my OS does, including styling my widgets. My scrollbars, my scrolling behavior, window chrome, all of it… whether it’s good or bad or right or wrong, that’s between me and my OS. As a user, I hate when web…

>> Microsoft and Apple have already done all that work.

eg. Dark Mode - wasn't created by Browser or OS providers, but developers (as I understand), then OS/Browsers played catch-up. Developers can and sometimes do influence Design "upstream".

Re: Don't use custom CSS scrollbars

#158

Earlier quoted context omitted.

> Also in terms of accessibility, so long as they're doing CSS-only changes, and the bar is sized compliant and has proper focus states, assistive technology won't care. Eh, it depends on your audience. My father has very poor eyesight. He doesn't use any assistive tools (e.g. screen readers or magnifiers), but he does need his computer-reading glasses. Accessibility isn't just ADA compliance and/or screen reader sup…

Same argument for why we should use tabs over space when accessibility seems squarely focused on the blind and screen readers when visual impairment is a broad spectrum. My eyesight isn’t ‘bad’, but it isn’t what it used to be and with so many code bases using 2-space indentation, I wonder why this isn’t configurable as I have a lot of difficulty discerning the contrast when it’s so shallow.

Any modern IDE will allow you to display 2-space indentations however you wish.

Re: Don't use custom CSS scrollbars

#159
post #145

Earlier quoted context omitted.

Which is straight up what jmbwell was complaining about, as it breaks their workflow such as tapping on the top to scroll to the beginning and everything else they mentioned.

I appreciate this is off topic and not a solution but on iOS you can tap the hole on top of your screen to scroll to the top on any application.

Yes, that's one of the features that break with endless scroll bars, which was what this whole discussion was about.

Re: Don't use custom CSS scrollbars

#160
The OS gets the scrollbar wrong so often that as a user and developer I’ve found I need to take care of it.

It’s fine relying on the “platform” but the platforms are just criminal cartels holding users and apps hostage.

Two specific examples, just on scroll bars. I’ve found the platform failing to support dark mode and failing to support mixed high DPI scenarios. Both of these failings result in poor accessibility and real pain for real users.

As a lowly app developer I don’t have the resources to do it perfectly for my users. But the OS is failing badly enough that I end up having to do the work. It’s not out of vanity, which is the only reason TFA author can imagine.

Post reply on HN