Skip to content

base.less: Define scrollbar color#5379

Closed
sukhwinder33445 wants to merge 1 commit intomainfrom
fix/scrollbar-color-in-dark-mode
Closed

base.less: Define scrollbar color#5379
sukhwinder33445 wants to merge 1 commit intomainfrom
fix/scrollbar-color-in-dark-mode

Conversation

@sukhwinder33445
Copy link
Copy Markdown
Contributor

@sukhwinder33445 sukhwinder33445 commented Jun 12, 2025

fixes #5378

requires: Icinga/ipl-web#296

This does not work for safari (with webkit css).

@sukhwinder33445 sukhwinder33445 self-assigned this Jun 12, 2025
@cla-bot cla-bot bot added the cla/signed label Jun 12, 2025
@sukhwinder33445 sukhwinder33445 marked this pull request as draft June 12, 2025 10:32
@sukhwinder33445 sukhwinder33445 force-pushed the fix/scrollbar-color-in-dark-mode branch from f722a08 to a73b3ba Compare November 7, 2025 08:08
@sukhwinder33445 sukhwinder33445 marked this pull request as ready for review November 7, 2025 08:09
@lippserd lippserd requested a review from flourish86 March 24, 2026 13:09
@lippserd
Copy link
Copy Markdown
Member

@flourish86 Is this the correct approach?

@flourish86
Copy link
Copy Markdown
Contributor

Sorry, maybe I'm missing context, but I think this just how chrome behaves and browser or even OS UI should be altered, imho. This might not be sustainable, because vendors might change that randomly.

Additionally to be noted is that scroll bars on macOS appear only, when you scroll as set by default. The circumstances, this affects user are therefore very narrow, I'd say.

So I don't see a point in changing this in the first place.

If you insist in changing it anyway, have you tried using scrollbar-color: auto?

See https://caniuse.com/mdn-css_properties_scrollbar-color_auto

Besides that: A popular GPT tool confirmed, that scrollbar-color is the best way to change the scrollbar color via css, but it might not get displayed properly and consistently in every browser.

Side note: It works perfectly fine in Safari and Firefox without the fix.

FF

Screenshot 2026-03-24 at 16 14 48

Safari

Screenshot 2026-03-24 at 16 15 09

@sukhwinder33445
Copy link
Copy Markdown
Contributor Author

The scrollbar works correctly in Safari and other browsers without any changes now. Only Chrome shows a white scrollbar (in dark mode), and unfortunately scrollbar-color: auto does not fix it, it is also the default value anyway.
Closing this PR since introducing a Chrome-only workaround is not appropriate.

@sukhwinder33445 sukhwinder33445 deleted the fix/scrollbar-color-in-dark-mode branch March 25, 2026 09:24
@nilmerg nilmerg removed the request for review from flourish86 March 30, 2026 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dark mode shows light mode scrollbar

3 participants