Darshana Suresh
Darshana Suresh

Reputation: 63

How to make VSCode extension webview's scrollbar always visible or change its color?

I'm developing a vscode extension with webview pages. VSCode's scrollbar appears only on hovering inside the scrollable container (both in editor and webviews). The background of the scroll track is not visible when using dark themes. Is there a way to change this background color to make it more visible?

Light theme: enter image description here

Dark theme (track not visible): enter image description here

I've tried adding 'scrollbarSlider' settings through workbench.colorCustomizations but that only changes the moving scrollbar's color and not the background track. I am also aware of 'editorOverviewRuler.background' setting which changes the background for editors but I'm looking for the same thing for webviews.

My use case is to let the user know that the area is scrollable, which is not evident in dark themes as the scrollbar only shows when I hover over its exact current position. It will also work if I could just make the scrollbar always visible instead of only on hovering. Is there a way to do this?

Upvotes: 1

Views: 554

Answers (0)

Related Questions