From 35f413505cb899faf8d9ece64d0a5beefe2ca271 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sun, 9 Nov 2025 14:40:14 +0200 Subject: [PATCH] fix(type_widgets/code): background color leaking in SQLite --- apps/client/src/widgets/containers/scrolling_container.css | 2 +- apps/client/src/widgets/type_widgets/code/Code.tsx | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/client/src/widgets/containers/scrolling_container.css b/apps/client/src/widgets/containers/scrolling_container.css index 491b8a563..5bea62418 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 0b6558f7b..33f43795b 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);