monaco-editor icon indicating copy to clipboard operation
monaco-editor copied to clipboard

[Feature Request] Rounded scroll bar

Open Wissperwind opened this issue 1 year ago • 4 comments

Context

  • [X] This issue is not a bug report. (please use a different template for reporting a bug)
  • [X] This issue is not a duplicate of an existing issue. (please use the search to find existing issues)

Description

Hi

I included the monaco editor in my website. But the website use modern style rounded scrollbars. Like this:

*::-webkit-scrollbar {
    width: 16px;
}

*::-webkit-scrollbar-track {
    border-radius: 8px;
}

*::-webkit-scrollbar-thumb {
    height: 56px;
    border-radius: 8px;
    border: 4px solid transparent;
    background-clip: content-box;
    background-color: #888;
}

*::-webkit-scrollbar-thumb:hover {
    background-color: #555;
}

It does no look good if the whole website has rounded scrollbars, but the editor has thick square ones. Can you please provide an option for rounded scrollbars?

302550609-4aa7e50e-0352-4fbe-a2bc-9056e6e4a13e

Monaco Editor Playground Link

No response

Monaco Editor Playground Code

No response

Wissperwind avatar Feb 06 '24 10:02 Wissperwind

I did some very basic poking around on the playground and looks like the scrollbars are hand-rolled and are not native browser scrollbars, so you can most likely use normal CSS to style these (as demonstrated in the demo)

.monaco-editor .monaco-scrollable-element .scrollbar.horizontal, .monaco-editor .decorationsOverviewRuler, .monaco-editor .monaco-scrollable-element .scrollbar.vertical .arrow-background

You will need to figure out what classes to target - but it is all here in the browser for your exploration and customization.

image

paustint avatar Mar 06 '24 04:03 paustint

So there are two types of Scrollbars widely used: The Win 10 Style Block ones often with arrwos and the round ones withour arrwos.

You see examples in your screenshot.

How about the idea to make a switch in the monaco editor wether you like the square ones ore the thin rounded ones? With the rounded scroll thumb I mean. That would make it easier for developers to get the right scrollbar for their needs.

Wissperwind avatar Mar 07 '24 09:03 Wissperwind

Rounded corners:

.monaco-editor { border-radius: 10px; } .overflow-guard { border-radius: 10px; }

Rounded slide-bar:

.slider { border-radius: 10px; }

Web-Dev-Machina avatar Apr 23 '24 19:04 Web-Dev-Machina

border-radius: 10px; makes them rounded. One step done. Can you also tell me what options to change, to make them half as thick and to increase the opacity? Is it possible to let the text end at the scrollbar?

AzureIP avatar Jul 16 '24 13:07 AzureIP