[Feature]: Make Markdown preview colors configurable
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 55/100
Direzione di ricerca
Start at the Markdown renderer used by wsh view file.md and trace how the active terminal theme foreground and --main-text-color are resolved. Check the preview styling for body text, headings, inline code, and fenced code. Done means custom presets can control those colors independently while existing presets retain sensible fallback behavior.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Go
- Stelle
- 22.3k
- Fork
- 1.1k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di wavetermdev/waveterm
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
wavetermdev/waveterm#3481 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
wavetermdev/waveterm#3435 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
wavetermdev/waveterm#3432 ·
-
enhancement triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
wavetermdev/waveterm#3431 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
wavetermdev/waveterm#3428 ·
Tutte le issue di wavetermdev/waveterm
Issue simili
-
nix: vendorHash is outdated Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
-
Bob Shell support Apertaenhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
santhosh-tekuri/jsonschema#276 ·