diff --git a/gui/src/components/StyledMarkdownPreview/index.tsx b/gui/src/components/StyledMarkdownPreview/index.tsx index f648dd61b..98ca83881 100644 --- a/gui/src/components/StyledMarkdownPreview/index.tsx +++ b/gui/src/components/StyledMarkdownPreview/index.tsx @@ -77,14 +77,13 @@ const StyledMarkdown = styled.div<{ } word-wrap: break-word; border-radius: ${defaultBorderRadius}; - background-color: ${vscEditorBackground}; + background-color: var(--vscode-textCodeBlock-background); font-size: ${getFontSize() - 2}px; font-family: var(--vscode-editor-font-family); } code:not(pre > code) { font-family: var(--vscode-editor-font-family); - color: var(--vscode-input-placeholderForeground); } background-color: ${(props) => props.bgColor}; diff --git a/gui/src/components/index.ts b/gui/src/components/index.ts index 71fd4ae0c..a1d2ed387 100644 --- a/gui/src/components/index.ts +++ b/gui/src/components/index.ts @@ -12,6 +12,9 @@ export const vscForeground = varWithFallback("foreground"); export const vscButtonBackground = varWithFallback("primary-background"); export const vscButtonForeground = varWithFallback("primary-foreground"); export const vscEditorBackground = varWithFallback("editor-background"); +export const vscTextCodeBlockBackground = varWithFallback( + "textCodeBlockBackground", +); export const vscListActiveBackground = varWithFallback("list-active"); export const vscFocusBorder = varWithFallback("border-focus"); export const vscListActiveForeground = varWithFallback( diff --git a/gui/src/styles/theme.ts b/gui/src/styles/theme.ts index ad0ee0bd7..144a9d8d6 100644 --- a/gui/src/styles/theme.ts +++ b/gui/src/styles/theme.ts @@ -140,6 +140,10 @@ export const THEME_COLORS = { vars: ["--vscode-textLink-foreground"], default: "#5c9ce6", // medium blue }, + textCodeBlockBackground: { + vars: ["--vscode-textCodeBlock-background"], + default: "#1e1e1e", // same as editor-background + }, accent: { vars: ["--vscode-tab-activeBorderTop", "--vscode-focusBorder"], default: "#4d8bf0", // bright blue