TheAlgorithms / website

The Algorithms website providing GitHub's largest open-source algorithm library.
https://the-algorithms.com
MIT License
848 stars 186 forks source link

[FEATURE] Customize scrollbar #161

Closed raklaptudirm closed 2 years ago

raklaptudirm commented 2 years ago

Description of the feature request

The scroll-bar could be customized for a better overall look of the website.

Add screenshots of the feature request (if applicable)

No response

Additional information/context

No response

maltejur commented 2 years ago

Hmm I don't see the advantage which that would bring. Imo that would probably just make the website more clunky. Custom scroll-bars also work somewhat different in different browsers.

raklaptudirm commented 2 years ago

I was thinking about nothing too special, just something matching the color theme.

maltejur commented 2 years ago

Hmm, the problem with that is that the CSS for changing the scrollbar color is different for every browser and a pain in the ass to get right, even for simple things like changing the color.

raklaptudirm commented 2 years ago

Chrome, Edge, Safari and Opera support the ::-webkit-scrollbar pseudo element, which I believe should cover most major browsers. browsers

maltejur commented 2 years ago

But Firefox :( ...

raklaptudirm commented 2 years ago

Well, for firefox it will just be the default scrollbar, so we are not losing anything. Or you could do this and add support separately.

maltejur commented 2 years ago

Hmm, I've tested it out a bit on the colored_scrollbar branch and it looks good in Firefox but pretty bad in chrome. Here's a preview: https://website-eipqoq7f6-thealgorithms.vercel.app/. So I would say we should just keep the native scrollbar which already looks pretty good imo (at least on Firefox/Linux).

But do you maybe have some better colors/other styles which we could try which don't look as bad as mine in chrome?

raklaptudirm commented 2 years ago

They look the same in both the browsers to me though

Chrome: chromebar Firefox: firefoxbar

maltejur commented 2 years ago

Ah probably because Firefox actually respects how the native scrollbar looks.

raklaptudirm commented 2 years ago

Uh, so where does this leave us?

maltejur commented 2 years ago

Hm, imo the native scrollbar just looks better, especialy in the light mode

raklaptudirm commented 2 years ago

You can preserve the native look in light mode, but for dark mode I think we should change it.

raklaptudirm commented 2 years ago

Also, I suggest you make the actual scroller a light shade of gray like #bbbbbb in light mode.

maltejur commented 2 years ago

Hmm but even if we do that, I think the native scrollbar just looks better. In the custom scrollbar some key things are just missing, like the little arrows on the top and bottom, and the changing colors when you click or hover the scrollbar.

https://user-images.githubusercontent.com/48161361/156931408-0d417e07-e664-49f1-8020-efd63927b49b.mp4

raklaptudirm commented 2 years ago

I think we should do a poll in the server, see what everyone thinks, and then decide from that ¯_(ツ)_/¯

maltejur commented 2 years ago

Sure

raklaptudirm commented 2 years ago

@maltejur scrollbars