Skip to content

Commit dfd55e9

Browse files
committed
feat: default to github-dark for codemirror theme in dark mode (see #108)
1 parent c26e992 commit dfd55e9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/yasgui/src/TabSettingsModal.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ export default class TabSettingsModal {
452452
});
453453

454454
const storedDarkTheme = this.tab.yasgui.persistentConfig.getCodeMirrorTheme("dark");
455-
themeDarkSelect.value = storedDarkTheme || "material-palenight";
455+
themeDarkSelect.value = storedDarkTheme || "github-dark";
456456

457457
themeDarkSection.appendChild(themeDarkLabel);
458458
themeDarkSection.appendChild(themeDarkHelp);
@@ -1491,7 +1491,7 @@ export default class TabSettingsModal {
14911491
const currentMode = this.tab.yasgui.getTheme();
14921492
const themeToApply =
14931493
currentMode === "dark"
1494-
? codeMirrorThemeDarkSelect?.value || "material-palenight"
1494+
? codeMirrorThemeDarkSelect?.value || "github-dark"
14951495
: codeMirrorThemeLightSelect?.value || "default";
14961496

14971497
// Apply theme to all CodeMirror instances

packages/yasgui/src/ThemeManager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ export class ThemeManager {
7474
let cmTheme: string;
7575
if (this.persistentConfig) {
7676
const storedTheme = this.persistentConfig.getCodeMirrorTheme(theme);
77-
cmTheme = storedTheme || (theme === "dark" ? "material-palenight" : "default");
77+
cmTheme = storedTheme || (theme === "dark" ? "github-dark" : "default");
7878
} else {
7979
// Fallback if persistentConfig not yet available
80-
cmTheme = theme === "dark" ? "material-palenight" : "default";
80+
cmTheme = theme === "dark" ? "github-dark" : "default";
8181
}
8282

8383
// Find all CodeMirror instances within the root element

0 commit comments

Comments
 (0)