fix(editor): la barre de numerotation de ligne suit le theme (BUG-058)
CI / lint (push) Successful in 1m37s
CI / security (push) Successful in 1m1s
CI / test (push) Successful in 2m54s
CI / build (push) Successful in 56s
CI / e2e (push) Successful in 10m43s

This commit is contained in:
2026-09-17 10:02:48 -04:00
parent c0eea526de
commit 26328fadeb
12 changed files with 57 additions and 13 deletions
+13
View File
@@ -380,6 +380,19 @@ test("style.css: #editor-body scrolls through the CodeMirror scroller only", ()
"global .cm-scroller min-height override reintroduces the double scrollbar");
});
// ── BUG-058: the line-number gutter follows the active theme ──
test("style.css themes the CodeMirror line-number gutter with CSS variables", () => {
const gutter = cssSrc.match(/\.cm-editor \.cm-gutters \{([^}]*)\}/);
assert.ok(gutter, "themed .cm-gutters rule not found");
assert.match(gutter[1], /background:\s*color-mix\([^;]*var\(--text-primary\)/,
"gutter background must derive from the theme, not CodeMirror's hardcoded #f5f5f5");
assert.match(gutter[1], /color:\s*var\(--text-secondary\)/);
assert.match(gutter[1], /border-right:\s*1px solid var\(--border\)/);
const active = cssSrc.match(/\.cm-editor \.cm-gutters \.cm-activeLineGutter \{([^}]*)\}/);
assert.ok(active, "themed .cm-activeLineGutter rule not found");
assert.match(active[1], /color-mix\([^;]*var\(--text-primary\)/);
});
// ── BUG-054: the shared save button must not stay stuck on the spinner ──
test("utils.js resetSaveButton restores the checkmark and re-enables the button", () => {
const fn = utilsSrc.match(/function resetSaveButton\(\) \{([\s\S]*?)\n\}/);