Home

Awesome

<p align="center"> <img height="128" src="./res/icon.png"></img> <h1 align="center">Custom UI Style</h1> <p align="center"> <a href="https://marketplace.visualstudio.com/items?itemName=subframe7536.custom-ui-style" target="__blank"><img src="https://img.shields.io/visual-studio-marketplace/v/subframe7536.custom-ui-style.svg?color=eee&amp;label=VS%20Code%20Marketplace&logo=visual-studio-code" alt="Visual Studio Marketplace Version" /></a> <a href="https://kermanx.github.io/reactive-vscode/" target="__blank"><img src="https://img.shields.io/badge/made_with-reactive--vscode-%23007ACC?style=flat&labelColor=%23229863" alt="Made with reactive-vscode" /></a> </p> </p>

VSCode extension that custom ui css style in both editor and webview

[!warning] This extension works by editting the VSCode's css and js files.

So, a warning appears while the first time to install or VSCode update. You can click the [never show again] to avoid it.

Features

Usage

When first installed or new VSCode version upgraded, the plugin will prompt to dump backup file.

After changing the configuration, please open command panel and run Custom UI Style: Reload to apply the configuration.

To rollback or uninstall the plugin, please open command panel and run Custom UI Style: Rollback to restore the original VSCode file.

See details

FAQ

No Effect?

If you are using Windows or Linux, make sure you have closed all the VSCode windows and then restart.

If you are using MacOS, press <kbd>Command + Q</kbd> first, then restart VSCode.

There are guide and video (MacOS) of the process.

RangeError: Maximum call stack size exceeded

Due to system permission restrictions, you will receive RangeError: Maximum call stack size exceeded prompt when you reload the configuration. You need to fully close (press <kbd>Command + Q</kbd>) VSCode first, then run:

sudo chown -R $(whoami) "/Applications/Visual Studio Code.app"

See #6

Configurations

<!-- configs -->
KeyDescriptionTypeDefault
custom-ui-style.electronElectron BrowserWindow optionsobject{}
custom-ui-style.font.monospaceGlobal monospace font family that apply in both editor and webview, fallback to editor's font familystring``
custom-ui-style.font.sansSerifGlobal sans-serif font family that apply in both editor and webviewstring``
custom-ui-style.background.urlFull-screen background image url, support protocol: 'https://', 'file://', 'data:'string``
custom-ui-style.background.opacityBackground image opacitynumber0.9
custom-ui-style.background.sizeBackground image sizestring"cover"
custom-ui-style.background.positionBackground image sizestring"center"
custom-ui-style.stylesheetCustom css for editor, support nest selectorsobject{}
custom-ui-style.webview.monospaceSelectorCustom monospace selector in webviewarray``
custom-ui-style.webview.sansSerifSelectorCustom sans-serif selector in webviewarray``
custom-ui-style.webview.stylesheetCustom css for webview, support nest selectorsobject{}
<!-- configs -->

Commands

<!-- commands -->
CommandTitle
custom-ui-style.reloadCustom UI Style: Reload
custom-ui-style.rollbackCustom UI Style: Rollback
<!-- commands -->

Example

Avaiable CSS Variables:

{
  "custom-ui-style.font.sansSerif": "Maple UI, -apple-system",
  "custom-ui-style.background.url": "file:///D:/image/ide-bg.jpg",
  "custom-ui-style.webview.monospaceSelector": [".codeblock", ".prism [class*='language-']"],
  "custom-ui-style.stylesheet": {
    "span:not([class*='dyn-rule'])+span[class*='dyn-rule']": {
      "border-top-left-radius": "3px",
      "border-bottom-left-radius": "3px"
    },
    "span[class*='dyn-rule']:has(+span:not([class*='dyn-rule']))": {
      "border-top-right-radius": "3px",
      "border-bottom-right-radius": "3px"
    },
    ".cdr": {
      "border-radius": "3px"
    },
    ".quick-input-widget": {
      "top": "25vh !important"
    },
    ".overlayWidgets .editorPlaceholder": {
      "line-height": "unset !important"
    },
    ".monaco-workbench .activitybar .monaco-action-bar": {
      "& .action-label": {
        "font-size": "20px !important",
        "&::before": {
          "position": "absolute",
          "z-index": 2
        },
        "&::after": {
          "content": "''",
          "width": "75%",
          "height": "75%",
          "position": "absolute",
          "border-radius": "6px"
        }
      },
      "& .action-item:hover .action-label": {
        "color": "var(--vscode-menu-selectionForeground) !important",
        "&::after": {
          "background-color": "var(--vscode-menu-selectionBackground)"
        }
      }
    }
  }
}

Credit

License

MIT