Browse Source

fix: light theme code highlight

Yifei Zhang 1 year ago
parent
commit
6155a190ac
2 changed files with 29 additions and 30 deletions
  1. 0 1
      app/styles/markdown.scss
  2. 29 29
      app/styles/prism.scss

+ 0 - 1
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;
 }
 

+ 29 - 29
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 dark {
-//   .markdown-body pre[class*="language-"] {
-//     filter: none;
-//   }
-// }
-
-// :root {
-// @include light();
-// }
-
-// .light {
-//   @include light();
-// }
-
-// .dark {
-//   @include dark();
-// }
-
-// @media (prefers-color-scheme: dark) {
-//   :root {
-//     @include dark();
-//   }
-// }
+@mixin light {
+  .markdown-body pre {
+    filter: invert(1) hue-rotate(90deg) brightness(1.3);
+  }
+}
+
+@mixin dark {
+  .markdown-body pre {
+    filter: none;
+  }
+}
+
+:root {
+  @include light();
+}
+
+.light {
+  @include light();
+}
+
+.dark {
+  @include dark();
+}
+
+@media (prefers-color-scheme: dark) {
+  :root {
+    @include dark();
+  }
+}