fix(editor): la barre de numerotation de ligne suit le theme (BUG-058)
This commit is contained in:
@@ -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\}/);
|
||||
|
||||
Reference in New Issue
Block a user