Skip to content

Build your personal knowledge base with Trilium Notes

fix(type_widgets/code): background color leaking in SQLite

Elian Doran35f413505cb8
diff --git a/apps/client/src/widgets/containers/scrolling_container.css b/apps/client/src/widgets/containers/scrolling_container.css
index 491b8a5639..5bea624180 100644
--- a/apps/client/src/widgets/containers/scrolling_container.css
+++ b/apps/client/src/widgets/containers/scrolling_container.css
@@ -4,6 +4,6 @@
position: relative;
}
-.note-split.type-code > .scrolling-container {
+.note-split.type-code:not(.mime-text-x-sqlite) > .scrolling-container {
background-color: var(--code-background-color);
}
\ No newline at end of file
diff --git a/apps/client/src/widgets/type_widgets/code/Code.tsx b/apps/client/src/widgets/type_widgets/code/Code.tsx
index 0b6558f7b3..33f43795be 100644
--- a/apps/client/src/widgets/type_widgets/code/Code.tsx
+++ b/apps/client/src/widgets/type_widgets/code/Code.tsx
@@ -153,7 +153,6 @@ export function CodeEditor({ parentComponent, ntxId, containerRef: externalConta
const theme = getThemeById(codeNoteTheme.substring(DEFAULT_PREFIX.length));
if (theme) {
codeEditorRef.current.setTheme(theme).then(() => {
- if (mime === "text/x-sqlite;schema=trilium") return;
const editor = containerRef.current?.querySelector(".cm-editor");
if (!editor) return;
const style = window.getComputedStyle(editor);