Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to customize the color of TabCloseButton icon in VSCode?

Tags:

VSCode version 1.16

When i have unsaved changes in a file, the dot in the tab file's name is not really visible as seen below.

image of pending changes in a file

I'd like to highlight it somehow (e.g. to change its color). I inspected the dot element via Dev tools in VSCode and it has a ciass of action-label icon close-editor-action but i am not sure how could I implement the CSS into editors' customization..

I know about workbench.colorCustomizations settings but i have not found any documentation about this particular little thing. The only customizable setting of tabCloseButton is changing its position but not its visual.

Does anybody know how could this be implemented?

like image 289
anceque Avatar asked Sep 08 '17 09:09

anceque


People also ask

How do I change the color of my VS Code icon?

You will need to run a resource editor, use it to open the executable file, find the icon, extract it to a file, then edit it to change its color, and finally replace it in the executable.

How do I change the color of the top bar in VS Code?

In VS Code, open the Color Theme picker with File > Preferences > Color Theme. (Code > Preferences > Color Theme on macOS).

How do I change the tab indent in VS Code?

You can click on the Status Bar indentation display to bring up a dropdown with indentation commands allowing you to change the default settings for the open file or convert between tab stops and spaces.


1 Answers

Extension Custom CSS and JS Loader.

For instance: changing the entire unsaved tab:

.tab.dirty {
    background-origin: border-box;
    background-image: repeating-linear-gradient(
      45deg,
      transparent,
      transparent 8px,
      #465298 9px
    );
}

Or changing close icon:

.tab.dirty .close-editor-action {
    background: #465298 !important; /* here could be some inline image*/
    border-radius: 50%;
}
like image 61
Alex Avatar answered Sep 24 '22 17:09

Alex