From 19410b002475cd16c1bf73b07e033e964e785087 Mon Sep 17 00:00:00 2001 From: sawka Date: Mon, 11 Mar 2024 11:47:22 -0700 Subject: [PATCH] fix background color on code blocks in markdown in light mode --- src/app/common/elements/markdown.less | 24 +++++++++++------------- src/app/common/elements/markdown.tsx | 2 +- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/src/app/common/elements/markdown.less b/src/app/common/elements/markdown.less index e24d84b16..8316071a9 100644 --- a/src/app/common/elements/markdown.less +++ b/src/app/common/elements/markdown.less @@ -8,19 +8,6 @@ margin-bottom: 10px; } - code { - background-color: var(--markdown-bg-color); - color: var(--app-text-color); - font-family: var(--termfontfamily); - border-radius: 4px; - } - - code.inline { - padding-top: 0; - padding-bottom: 0; - font-family: var(--termfontfamily); - } - .title { color: var(--app-text-color); margin-top: 16px; @@ -64,12 +51,23 @@ margin: 4px 10px 4px 10px; padding: 6px 6px 6px 10px; border-radius: 4px; + + code { + background-color: transparent; + } } pre.selected { outline: 2px solid var(--markdown-outline-color); } + code { + color: var(--app-text-color); + font-family: var(--termfontfamily); + border-radius: 4px; + background-color: var(--markdown-bg-color); + } + .title { font-weight: semibold; padding-top: 6px; diff --git a/src/app/common/elements/markdown.tsx b/src/app/common/elements/markdown.tsx index 86c558973..5762b05d1 100644 --- a/src/app/common/elements/markdown.tsx +++ b/src/app/common/elements/markdown.tsx @@ -24,7 +24,7 @@ function HeaderRenderer(props: any, hnum: number): any { } function CodeRenderer(props: any): any { - return {props.children}; + return {props.children}; } @mobxReact.observer