From aeafaf1d9696d4f9f1032e7cc683ed56e0763e64 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Sun, 1 Feb 2026 04:00:51 +0100 Subject: [PATCH] Update editor styles for CodeMirror integration --- src/index.css | 66 ++++++++++++++++++++------------------------------- 1 file changed, 26 insertions(+), 40 deletions(-) diff --git a/src/index.css b/src/index.css index ce54ccc..df7863f 100644 --- a/src/index.css +++ b/src/index.css @@ -624,59 +624,45 @@ body:not([data-theme="light"]) .folder-item { justify-content: flex-end; } -.editor__textarea { +.editor__codemirror { flex: 1; width: 100%; - resize: none; - border: none; - padding: 14px; - font-family: "SF Mono", "Menlo", "Consolas", monospace; - font-size: 0.95rem; - line-height: 1.5; - white-space: pre-wrap; - word-break: break-word; - overflow-wrap: anywhere; + min-height: 0; +} + +.editor__codemirror--hidden { + display: none; +} + +.editor__codemirror .cm-editor { + height: 100%; background: transparent; color: var(--ink); -} - -.editor__textarea:focus { - outline: none; -} - -.editor__textarea--hidden { - display: none; -} - -.editor__textarea-wrap--preview .tln-wrapper { - display: none; -} - -.tln-wrapper { - padding: 14px 10px; - min-width: 3ch; - text-align: right; font-family: "SF Mono", "Menlo", "Consolas", monospace; font-size: 0.95rem; line-height: 1.5; - color: var(--muted); +} + +.editor__codemirror .cm-scroller { + overflow: auto; +} + +.editor__codemirror .cm-content { + padding: 14px; +} + +.editor__codemirror .cm-gutters { background: var(--bg-contrast); border-right: 1px solid var(--border); - user-select: none; - overflow: hidden; - height: 100%; - counter-reset: line; + color: var(--muted); } -.tln-line { - display: block; - height: 1.5em; +.editor__codemirror .cm-gutterElement { + padding: 0 10px 0 0; } -.tln-line::before { - counter-increment: line; - content: counter(line); - font-variant-numeric: tabular-nums; +.editor__codemirror .cm-activeLineGutter { + background: transparent; } .markdown-preview {