Skip to content

Support dark and light high contrast theme types #144193

@daviddossett

Description

@daviddossett

Adding the new light high contrast theme (#143398) uncovered challenges across the codebase when attempting to render unique styles or assets based on the theme settings. Here's a simple example where the letterpress SVG used in an empty editor view was hardcoded for the original dark HC theme.

Proposal

Currently we only expose a general high contrast theme type. A couple of things I think would be worth supporting:

  • Split hc into something like hc-light and hc-dark
  • Support workbench.preferredLightHighContrastColorTheme and workbench.preferredDarkHighContrastColorTheme if we're able to pick up the OS mode as an additional input like we do for regular dark/light themes.

Ideally the outcome here is that we can continue to use the theme type as an input in both logic (e.g. this.theme.type === ColorScheme.LIGHT_HIGH_CONTRAST and in stylesheets (e.g. .hc-light or .hc-black).

It would be great to get any additonal thoughts/opinions. cc @isidorn @aeschli @misolori

Metadata

Metadata

Labels

insiders-releasedPatch has been released in VS Code InsidersthemesColor theme issues

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions