diff --git a/src/style/focus.css b/src/style/focus.css index 1395643..35e2fc5 100644 --- a/src/style/focus.css +++ b/src/style/focus.css @@ -1,12 +1,16 @@ -div.CodeMirror .CodeMirror-line, div.CodeMirror img { +div.CodeMirror .CodeMirror-line, +div.cm-editor .cm-line, +div.CodeMirror img { opacity: 0.4; color: var(--joplin-color) !important; transition: opacity 0.2s; } div.CodeMirror .CodeMirror-activeline .CodeMirror-line, +div.CodeMirror .CodeMirror-activeline img, div.CodeMirror .CodeMirror-activeline.cm-line, -div.CodeMirror .CodeMirror-activeline img { +div.cm-editor .CodeMirror-activeline + .rich-markdown-resource.cm-line > img, +div.cm-editor .CodeMirror-activeline + .rich-markdown-resource.cm-line { opacity: 1.0; transition: opacity 0.4s; } diff --git a/src/style/stylish.css b/src/style/stylish.css index 06a5719..5d2cb0f 100644 --- a/src/style/stylish.css +++ b/src/style/stylish.css @@ -13,7 +13,8 @@ div.CodeMirror span.cm-hr { /* END Horizontal Rule*/ /* Blockquotes */ -pre.cm-rm-blockquote.CodeMirror-line { +pre.cm-rm-blockquote.CodeMirror-line, +pre.cm-rm-blockquote.cm-line { border-left: 4px solid var(--joplin-code-border-color); opacity: 0.7; } @@ -61,35 +62,42 @@ div.CodeMirror .cm-jn-code-block .cm-katex-marker-close { /* END Fade tokens*/ /* Headers */ -div.CodeMirror .cm-header.cm-rm-header-token:not(.cm-whitespace-a, .cm-whitespace-b) { +div.CodeMirror .cm-header.cm-rm-header-token:not(.cm-whitespace-a, .cm-whitespace-b), +div.cm-editor .cm-header > .cm-rm-header-token { font-family: monospace; font-size: 0.9em; /* Add some spacing for breathing room */ margin-right: 0.3ex; } -div.CodeMirror .cm-rm-header-token.cm-header-1:not(.cm-whitespace-a, .cm-whitespace-b) { +div.CodeMirror .cm-rm-header-token.cm-header-1:not(.cm-whitespace-a, .cm-whitespace-b), +div.cm-editor .cm-header.cm-h1 > .cm-rm-header-token { /* 1ex is the height of a lowercase x, it's an approximation for width */ /* We need 2ex to account for the space character */ margin-left: -2ex; } -div.CodeMirror .cm-rm-header-token.cm-header-2:not(.cm-whitespace-a, .cm-whitespace-b) { +div.CodeMirror .cm-rm-header-token.cm-header-2:not(.cm-whitespace-a, .cm-whitespace-b), +div.cm-editor .cm-header.cm-h2 > .cm-rm-header-token { margin-left: -3ex; } -div.CodeMirror .cm-rm-header-token.cm-header-3:not(.cm-whitespace-a, .cm-whitespace-b) { +div.CodeMirror .cm-rm-header-token.cm-header-3:not(.cm-whitespace-a, .cm-whitespace-b), +div.cm-editor .cm-header.cm-h3 > .cm-rm-header-token { margin-left: -4ex; } -div.CodeMirror .cm-rm-header-token.cm-header-4:not(.cm-whitespace-a, .cm-whitespace-b) { +div.CodeMirror .cm-rm-header-token.cm-header-4:not(.cm-whitespace-a, .cm-whitespace-b), +div.cm-editor .cm-header.cm-h4 > .cm-rm-header-token { margin-left: -5ex; } -div.CodeMirror .cm-rm-header-token.cm-header-5:not(.cm-whitespace-a, .cm-whitespace-b) { +div.CodeMirror .cm-rm-header-token.cm-header-5:not(.cm-whitespace-a, .cm-whitespace-b), +div.cm-editor .cm-header.cm-h5 > .cm-rm-header-token { margin-left: -6ex; } -div.CodeMirror .cm-rm-header-token.cm-header-6:not(.cm-whitespace-a, .cm-whitespace-b) { +div.CodeMirror .cm-rm-header-token.cm-header-6:not(.cm-whitespace-a, .cm-whitespace-b), +div.cm-editor .cm-header.cm-h6 > .cm-rm-header-token { margin-left: -7ex; } /* END Headers */