be5invis / vscode-custom-css

Custom CSS Plugin for Visual Studio Code. Based on vscode-icon
MIT License
879 stars 68 forks source link

Question: What should I do to replace just a small portion of the file `workbench.desktop.main.js`? #173

Closed septsea closed 1 year ago

septsea commented 2 years ago

I wish to change the fonts of the interface of VSC. I am using Windows 11.

Suppose that I wish to replace the Segoe fonts by Comic Sans MS (I do not really like it; I just use it as an example). The following code replaces the fonts in most of the places by Comic Sans MS.

.windows {
    font-family: "Comic Sans MS", sans-serif !important;
}

Nevertheless, the fonts in pages such as Release Notes are not controlled by CSS. I find that modifying workbench.desktop.main.js (which is in the same directory as workbench.desktop.main.css) works. Specifically, first, go to the 912th line. Then, replace '"Segoe WPC", "Segoe UI", sans-serif' by '"Comic Sans MS", sans-serif'. image (I have multiple versions of VSC.) At last, save the file and restart VSC. Open Release Notes and the fonts are really changed.

This approach is direct but tiring. I have to modify workbench.desktop.main.js manually whenever VSC is updated. (I use VSC Insiders, too.)

My question is whether there is a way to modify DEFAULT_FONT_FAMILY by vscode-custom-css.

Thank you in advance.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days.