1

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?

  • im not sure but try scrollbarTrack instead of scrollbarSlider if this exists. – Waradu Mar 14 '23 at 10:47
  • if the scroll bar is part of the webview you can inject CSS in the webview to restyle the scrollbar, you can use variables to use theme colors – rioV8 Mar 14 '23 at 16:31

0 Answers0