X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/74b4751a1c110b4c824b14369d3a5eea3ad5816a..refs/pull/4467/head:/resources/sass/_codemirror.scss diff --git a/resources/sass/_codemirror.scss b/resources/sass/_codemirror.scss index 910b216e4..c4b0e2e89 100644 --- a/resources/sass/_codemirror.scss +++ b/resources/sass/_codemirror.scss @@ -4,13 +4,27 @@ .cm-editor { font-size: 12px; - border: 1px solid; - @include lightDark(border-color, #ddd, #444); - margin-bottom: $-l; + border: 1px solid #ddd; line-height: 1.4; + margin-bottom: $-l; +} + +.page-content .cm-editor, +.CodeMirrorContainer .cm-editor { border-radius: 4px; } +.cm-editor .cm-line, .cm-editor .cm-gutter { + font-family: var(--font-code); +} + +// Manual dark-mode definition so that it applies to code blocks within the shadow +// dom which are used within the WYSIWYG editor, as the .dark-mode on the parent +// node are not applies so instead we have the class on the parent element. +.dark-mode .cm-editor { + border-color: #444; +} + /** * Custom Copy Button */ @@ -40,7 +54,7 @@ fill: currentColor; } &.success { - background: $positive; + background: var(--color-positive); color: #FFF; } &:focus {