Skip to content

Commit

Permalink
Merge pull request ChatGPTNextWeb#87 from Yidadaa/bugfix-0328
Browse files Browse the repository at this point in the history
fix: light theme code highlight
  • Loading branch information
Yidadaa authored Mar 28, 2023
2 parents 8f49807 + 6155a19 commit f0dd95a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 30 deletions.
1 change: 0 additions & 1 deletion app/styles/markdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,6 @@
overflow: auto;
font-size: 85%;
line-height: 1.45;
background-color: var(--color-canvas-subtle);
border-radius: 6px;
}

Expand Down
58 changes: 29 additions & 29 deletions app/styles/prism.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

0 comments on commit f0dd95a

Please sign in to comment.