]> BookStack Code Mirror - bookstack/blobdiff - resources/sass/_codemirror.scss
respective book and chapter structure added.
[bookstack] / resources / sass / _codemirror.scss
index 910b216e4a45a7a18d095d1bd5cbdcac11bdf1b7..c79671d76467a4baf3b8edcab39598a769b996ce 100644 (file)
@@ -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
+// <html> node are not applies so instead we have the class on the parent element.
+.dark-mode .cm-editor {
+  border-color: #444;
+}
+
 /**
  * Custom Copy Button
  */
   align-items: center;
   justify-content: center;
   top: -1px;
-  right: -1px;
+  inset-inline-end: -1px;
   background-color: #EEE;
   border: 1px solid #DDD;
-  border-radius: 0 4px 0 0;
+  border-start-end-radius: 4px;
   @include lightDark(background-color, #eee, #333);
   @include lightDark(border-color, #ddd, #444);
   @include lightDark(color, #444, #888);
@@ -40,7 +54,7 @@
     fill: currentColor;
   }
   &.success {
-    background: $positive;
+    background: var(--color-positive);
     color: #FFF;
   }
   &:focus {