Skip to content

Fix markdown CodeRenderable illegible in light theme#717

Open
NicoDeVeaux wants to merge 4 commits intoanomalyco:mainfrom
NicoDeVeaux:fix_markdown_light_theme
Open

Fix markdown CodeRenderable illegible in light theme#717
NicoDeVeaux wants to merge 4 commits intoanomalyco:mainfrom
NicoDeVeaux:fix_markdown_light_theme

Conversation

@NicoDeVeaux
Copy link

I noticed that when in light mode, CodeRenderable text was rendered white on white: it was illegible.

This updates markdown.ts to:

  • derive code-block fallback colors from markup.raw.block / markup.raw / default
  • pass those colors into internal CodeRenderable creation

Includes simple unit tests

@NicoDeVeaux NicoDeVeaux changed the title Fix markdown light theme Fix markdown CodeRenderable illegible in light theme Feb 20, 2026
}

private getCodeFallbackStyle(): StyleDefinition | undefined {
return this.getStyle("markup.raw.block") || this.getStyle("markup.raw") || this.getStyle("default")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is language/parser/query specific and not generic enough. There is the default style, isn't that enough?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants