more reliable color selection

This commit is contained in:
Koen Lageveen 2017-07-29 11:35:48 +02:00
parent 510c9e6e2a
commit 55beda47f1
1 changed files with 1 additions and 1 deletions

View File

@ -10,7 +10,7 @@ var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
});
function applyColors() {
$("body").attr("style" ,"--foreground:" + $(".CodeMirror .cm-def").css("color") + "; --background:" + $(".CodeMirror").css("background-color") + ";");
$("body").attr("style" ,"--foreground:" + $(".CodeMirror").css("color") + "; --background:" + $(".CodeMirror").css("background-color") + ";");
}
// CodeMirror theme selector