You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 16, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 16, 2026. It is now read-only.
In my CM interface, I have made a <Select> which allows to choose the theme. Thus, it changes without reloading the editor (using .setOption("theme", <theme>).
At page load, I load the "default" theme.
When I change theme, the Zenburn options of class ".cm-s-zenburn" are not applied (most others work fine).
Thus, it misses global background and foreground colors.
By checking in other themes, I saw that they did not use ".cm-s-<theme>" for the global BG/FG but the class definition " .cm-s-<theme>.CodeMirror".
After making the mod in the Zenburn.css, it works fine.
Using CM v 5.52.0
I did not check for every theme, as I wanted to use Zenburn.
Activity
marijnh commentedon Mar 17, 2020
Could you be more clear? How is the zenburn theme different from the others? At a glance, they seem to use the same level of specificity.
thaxyz commentedon Mar 17, 2020
In my CM interface, I have made a <Select> which allows to choose the theme. Thus, it changes without reloading the editor (using .setOption("theme", <theme>).
At page load, I load the "default" theme.
When I change theme, the Zenburn options of class ".cm-s-zenburn" are not applied (most others work fine).
Thus, it misses global background and foreground colors.
By checking in other themes, I saw that they did not use ".cm-s-<theme>" for the global BG/FG but the class definition " .cm-s-<theme>.CodeMirror".
After making the mod in the Zenburn.css, it works fine.
Using CM v 5.52.0
I did not check for every theme, as I wanted to use Zenburn.
:-)
marijnh commentedon Mar 18, 2020
That makes sense. Applied in attached patch.
Update/5.58.2 (#1)
[zenburn theme] Improve specificity of background selector