From 1ed15644a338465405ea12192046919f8df34952 Mon Sep 17 00:00:00 2001 From: viphan007 <106945122+viphan007@users.noreply.github.com> Date: Tue, 11 Jun 2024 12:13:46 +0700 Subject: [PATCH] Fix codeblock disappear in darkmode (#387) --- src/components/RichText.js | 2 +- src/components/layout.scss | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/RichText.js b/src/components/RichText.js index e0cb99af140..a95f4de76a7 100644 --- a/src/components/RichText.js +++ b/src/components/RichText.js @@ -77,7 +77,7 @@ const RichTextWrapper = styled.div` background-color: #fcfaf6; text-shadow: none; body.dark-mode & { - background-color: #fcfaf6; + background-color: transparent; } } pre > code[class~='language-javascript']::before { diff --git a/src/components/layout.scss b/src/components/layout.scss index 2f70f8507ec..f07cf1049fd 100644 --- a/src/components/layout.scss +++ b/src/components/layout.scss @@ -2061,7 +2061,6 @@ body.dark-mode { code[class*='language-'], pre[class*='language-'] { color: #fff; - display: none; } pre { background-color: #24292e;