question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[theme] Improve darkScrollbar helper

See original GitHub issue
  • I have searched the issues of this repository and believe that this is not a duplicate.

Summary 💡

This is just an idea, but I think we should not set the scrollbar colors “arbitrarily” but rather via the theme. That way the colors have a connection to the used theme.

Examples 🌈

I was trying out something like this: https://github.com/Primajin/material-ui/commit/adb389074887567832a46d7f36f613ec61ec6736 this for sure needs more tweaking but it should convey the idea.

We use custom scrollbars with Material UI 4 both for dark and light - so for 5 it would be good if the scrollbars respect the theme.

Motivation 🔦

For example we use a different paper and background color in dark mode than the default theme. The scrollbars should match the paper color (or something from background) so that it fit’s with the overall design.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (11 by maintainers)

github_iconTop GitHub Comments

3reactions
oliviertassinaricommented, Feb 26, 2021

It looks great 🙏

1reaction
m4theushwcommented, May 27, 2021

From https://html.spec.whatwg.org/multipage/semantics.html#meta-color-scheme:

To aid user agents in rendering the page background with the desired color scheme immediately (rather than waiting for all CSS in the page to load), a ‘color-scheme’ value can be provided in a meta element.

The page is painted after the stylesheet is loaded, but the background comes first. Maybe we add the meta tag only in the docs to not flicker between the white background and the dark one.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[theme] Improve darkScrollbar helper · Issue #25016 - GitHub
We use custom scrollbars with Material UI 4 both for dark and light - so for 5 it would be good if the...
Read more >
How do I switch to Chromes dark scrollbar like GitHub does?
I just came across, that GitHub uses a dark scrollbar in Chrome, when you're using GitHubs dark mode ...
Read more >
Dark theme scroll bar css? : r/FirefoxCSS - Reddit
Dark theme scroll bar css? Whats the css to change the colour of the scroll bar?
Read more >
Help, my scrollbar is black!! | Avada Website Builder
The custom scrollbar is a nice feature to have. We use it and it works great. Yours looks good, it just needs a...
Read more >
Feature request: When using dark theme, have dark scrollbar ...
As of right now (Build 3.1.20170912), no matter what the theme setting is, the scrollbar is still grey slider on white bar.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found