skip to Main Content

I’m trying to customize the font of the context menu in Visual Studio Code by injecting custom CSS. However, I’m facing a few challenges:

  1. Context Menu Inspection: When I attempt to inspect the context menu in Developer Tools, the menu disappears before I can select it, making it hard to identify the correct CSS selector.
  2. Font Customization: I want to change the font family and size used specifically in the context menu.

Here’s what I’ve tried so far:

  • I’ve installed the Custom CSS and JS Loader extension in VSCode to allow custom CSS injection.
  • I’ve attempted using some general selectors, but I’m not sure which one specifically targets the context menu in VSCode.

Questions:

  • What is the correct CSS selector for the context menu items in VSCode?
  • Is there a reliable way to inspect the context menu items without them disappearing?

Any help on how to identify the selector or change the font in the context menu would be greatly appreciated!

2

Answers


  1. from what ive read the context menu class in VScode is usually a child of .monaco-menu.

    Also check this link:
    https://stackoverflow.com/a/57729835/27796957

    I think it will answer your question

    Login or Signup to reply.
  2. o change the context menu font in Visual Studio Code using custom CSS, you’ll need to use a custom extension called "Custom CSS and JS Loader". However, keep in mind that modifying VSCode’s UI with custom CSS can interfere with future updates and the stability of the editor

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search