Skip to content

Commit

Permalink
Refactored code to clean up CSS selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
michaellee committed Feb 16, 2022
1 parent 6d5007a commit 3c61645
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,4 @@ class StilleSettingTab extends PluginSettingTab {
this.plugin.refresh();
}));
}
}
}
14 changes: 8 additions & 6 deletions styles.css
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit 3c61645

Please sign in to comment.