From 6155a190ac91ea66a444b605567e3ee49b6ffced Mon Sep 17 00:00:00 2001 From: Yifei Zhang Date: Tue, 28 Mar 2023 05:24:29 +0000 Subject: [PATCH] fix: light theme code highlight --- app/styles/markdown.scss | 1 - app/styles/prism.scss | 48 ++++++++++++++++++++-------------------- 2 files changed, 24 insertions(+), 25 deletions(-) diff --git a/app/styles/markdown.scss b/app/styles/markdown.scss index ec2052c4..0a6b3bc5 100644 --- a/app/styles/markdown.scss +++ b/app/styles/markdown.scss @@ -843,7 +843,6 @@ overflow: auto; font-size: 85%; line-height: 1.45; - background-color: var(--color-canvas-subtle); border-radius: 6px; } diff --git a/app/styles/prism.scss b/app/styles/prism.scss index 22b20389..0d011ce0 100644 --- a/app/styles/prism.scss +++ b/app/styles/prism.scss @@ -121,32 +121,32 @@ } } -// @mixin light { -// .markdown-body pre[class*="language-"] { -// filter: invert(1) hue-rotate(50deg) brightness(1.3); -// } -// } +@mixin light { + .markdown-body pre { + filter: invert(1) hue-rotate(90deg) brightness(1.3); + } +} -// @mixin dark { -// .markdown-body pre[class*="language-"] { -// filter: none; -// } -// } +@mixin dark { + .markdown-body pre { + filter: none; + } +} -// :root { -// @include light(); -// } +:root { + @include light(); +} -// .light { -// @include light(); -// } +.light { + @include light(); +} -// .dark { -// @include dark(); -// } +.dark { + @include dark(); +} -// @media (prefers-color-scheme: dark) { -// :root { -// @include dark(); -// } -// } +@media (prefers-color-scheme: dark) { + :root { + @include dark(); + } +}