Fix code highlight theme change

This commit is contained in:
2025-10-23 19:12:09 +02:00
parent 543dbe6ffe
commit b13ee987c7
4 changed files with 69 additions and 40 deletions

View File

@@ -108,29 +108,3 @@ $navbar-height: 64px;
.tree {
padding-top: $padding;
}
// Syntax highlighting themes
@import 'highlight.js/styles/github.css' layer(light-theme);
@import 'highlight.js/styles/github-dark.css' layer(dark-theme);
// Show light theme by default
@layer light-theme {
[data-mantine-color-scheme='light'] .markdown-preview {
pre code.hljs {
display: block;
overflow-x: auto;
padding: 1em;
}
}
}
// Show dark theme in dark mode
@layer dark-theme {
[data-mantine-color-scheme='dark'] .markdown-preview {
pre code.hljs {
display: block;
overflow-x: auto;
padding: 1em;
}
}
}