microsoft / monaco-editor

A browser based code editor
https://microsoft.github.io/monaco-editor/
MIT License
40.21k stars 3.58k forks source link

scrollbarSlider.background isn't applied to scrollbar #2650

Open thien-do opened 3 years ago

thien-do commented 3 years ago

It seems that the "scrollbarSlider" color options (when define a theme) are not applied to the scrollbar, but only the minimap. I'm sorry if this is expected.

monaco-editor version: Latest Browser: All OS: Mac Playground code that reproduces the issue:

monaco.editor.defineTheme('myTheme', {
    base: 'vs',
    inherit: true,
    colors: {
        'scrollbarSlider.background': '#FF0000',
        'scrollbarSlider.hoverBackground': '#FF0000',
        'scrollbarSlider.activeBackground': '#FF0000',
    },
    rules: {}
});
monaco.editor.setTheme('myTheme');

monaco.editor.create(document.getElementById("container"), {
    value: "Hello\n".repeat(100),
    language: "text/plain"
});

Expected: the slider in scrollbar should be red Actual: the slider in minimal is red, the slider in scrollbar is still gray

tom-james-watson commented 3 years ago

The following works as a workaround: https://github.com/microsoft/monaco-editor/issues/908#issuecomment-433739458.

FYI this looks like a duplicate of https://github.com/microsoft/monaco-editor/issues/1551.

hediet commented 2 years ago

Reopening due to #2997.