Feature description
Markdown preview colors are not currently configurable through a custom theme or preset. For example, with a dark custom theme, opening a Markdown file using:
wsh view file.md
renders the document body text in bright white. With some dark custom backgrounds, the contrast is excessively harsh and makes longer Markdown documents uncomfortable to read.
The colors used for headings, inline code, and fenced code text also cannot be adjusted to fit the rest of the theme.
Steps to Reproduce
Apply a dark custom preset with a muted foreground color.
Run:
wsh view file.md
Compare the Markdown preview colors with the terminal and other components using the same preset.
Desired Behavior
Custom themes or presets should be able to configure the Markdown preview’s colors.
At minimum, it would be useful to control:
Body text
Headings
Inline code
The default foreground color for fenced code blocks
Possible theme variables or settings could include:
--markdown-text-color
--markdown-heading-color
```--markdown-code-color``
The exact names and implementation are less important than the main requirement that these colors be independently configurable by custom themes. When no Markdown-specific colors are configured, the preview could derive sensible defaults from the active terminal theme’s foreground color.
Implementation Suggestion
The Markdown renderer already uses var(--main-text-color), while the active terminal theme foreground appears to be resolved separately.
A likely implementation would be to expose the resolved foreground color to the Markdown preview as a local CSS variable, then allow Markdown-specific variables to override it.
For example, the fallback order could be:
- Markdown-specific color
- Active theme foreground
- Existing
--main-text-color
This would preserve the current behavior for existing presets while allowing custom themes to control the Markdown preview explicitly.
Anything else?
No response
Feature description
Markdown preview colors are not currently configurable through a custom theme or preset. For example, with a dark custom theme, opening a Markdown file using:
wsh view file.mdrenders the document body text in bright white. With some dark custom backgrounds, the contrast is excessively harsh and makes longer Markdown documents uncomfortable to read.
The colors used for headings, inline code, and fenced code text also cannot be adjusted to fit the rest of the theme.
Steps to Reproduce
Apply a dark custom preset with a muted foreground color.
Run:
wsh view file.mdCompare the Markdown preview colors with the terminal and other components using the same preset.
Desired Behavior
Custom themes or presets should be able to configure the Markdown preview’s colors.
At minimum, it would be useful to control:
Body text
Headings
Inline code
The default foreground color for fenced code blocks
Possible theme variables or settings could include:
--markdown-text-color--markdown-heading-color```--markdown-code-color``
The exact names and implementation are less important than the main requirement that these colors be independently configurable by custom themes. When no Markdown-specific colors are configured, the preview could derive sensible defaults from the active terminal theme’s foreground color.
Implementation Suggestion
The Markdown renderer already uses
var(--main-text-color), while the active terminal theme foreground appears to be resolved separately.A likely implementation would be to expose the resolved foreground color to the Markdown preview as a local CSS variable, then allow Markdown-specific variables to override it.
For example, the fallback order could be:
--main-text-colorThis would preserve the current behavior for existing presets while allowing custom themes to control the Markdown preview explicitly.
Anything else?
No response