diff --git a/main.ts b/main.ts index 94075fe..979f940 100644 --- a/main.ts +++ b/main.ts @@ -131,4 +131,4 @@ class StilleSettingTab extends PluginSettingTab { this.plugin.refresh(); })); } -} \ No newline at end of file +} diff --git a/styles.css b/styles.css index d3fc2b0..aeb5b6d 100644 --- a/styles.css +++ b/styles.css @@ -1,15 +1,17 @@ -body.StilleStyle .view-content div:not(.CodeMirror-activeline) > .CodeMirror-line { +/* Any line that isn't focused on, reduce opacity */ +body.StilleStyle .cm-editor.cm-focused .cm-line:not(.cm-active) { opacity: var(--unfocusedLevel); } -body.StilleStyle .cm-editor.cm-focused .cm-line:not(.cm-active) { +/* If the editor does not have focus, then reduce opacity of contents of editor */ +body.StilleStyle .cm-editor:not(.cm-focused) .cm-line{ opacity: var(--unfocusedLevel); } -body.StilleStyle .view-content .CodeMirror-activeline div { - opacity: 1.0; +body.StilleStyle .cm-editor .cm-active { + opacity: 1.0; } -body.StilleStyle .cm-editor:not(.cm-focused) { - opacity: var(--unfocusedLevel); +body.StilleStyle.is-mobile .cm-editor .cm-active { + opacity: 1.0; }