question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[themes] Allow custom variables and references in workbench color customizations section

See original GitHub issue

This is a feature request to allow defining custom color variables in the workbench color customizations section. It would allow creating a small palette of colors and reusing it across the workbench color definitions, saving many repetitions and making it much easier to maintain.

This is just simple text substitution based on some naming convention like the .less @variable convention. For example, see the @PaletteXXX variables in the sample below:

"workbench.colorCustomizations": {

      // custom colors
      "@Palette000": "#FFFFFF",
      "@Palette050": "#ECEFF1",
      "@Palette100": "#CFD8DC",
      "@Palette200": "#B0BEC5",
      "@Palette300": "#90A4AE",
      "@Palette700": "#455A64",

      // input control
      "input.background": "@Palette000",
      "input.foreground": "@Palette700",
      "input.placeholderForeground": "@Palette200",
      "inputOption.activeBorder": "@Palette300",
      "input.border": "@Palette100",

      // list views
      "list.activeSelectionBackground": "@Palette200",
      "list.activeSelectionForeground": "@Palette700",
      "list.inactiveSelectionBackground": "@Palette100",
      "list.hoverBackground": "@Palette100",
      "list.dropBackground": "@Palette100",
      "list.focusBackground": "@Palette100",

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:19
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
aeschlicommented, Jan 19, 2022

I’m expanding the issue to ‘variables’ and ‘references’

2reactions
memeplexcommented, Oct 27, 2021

https://github.com/microsoft/vscode/issues/73069 was closed as dup of this although I believe the intention was different: to refer to colors already defined by themes, not to variables defined by the end user. For example, if I want the base foreground color for markdown emphasis, instead of the more colorful variants many themes apply, I would like to express “for this use what this theme defines as the default foreground color” without having to hardcode colors for each theme.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Theme Color | Visual Studio Code Extension API
Theme Color reference that lists all themable colors in Visual Studio ... You can customize your active Visual Studio Code color theme with...
Read more >
Theme color reference - vscode-docs1 - Read the Docs
Theme Color Reference. You can customize your active Visual Studio Code color theme with the workbench.colorCustomizations user setting. { "workbench.
Read more >
Creating and applying themes for embedded dashboards and ...
You can use themes to customize font family, text color, background color, button color, tile color, and other visual elements.
Read more >
Customize syntax highlighting colors of data types and ...
I use Visual Studio Code 1.16 and custom theme (Actual) Obsidian. I try use featues editor.tokenColorCustomizations. Here is my custom user ...
Read more >
Building a Visual Studio Code Theme with Style Dictionary
Style Dictionary is a great tool for creating VSCode color themes for a ... You can reference token aliases which allow you to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found