Browse Source

Merge pull request #2843 from blink1073/codemirror-theme-isolation

Allow other CodeMirror themes to set background and color
Ian Rose 7 years ago
parent
commit
216494809b
2 changed files with 12 additions and 3 deletions
  1. 1 1
      jupyterlab/package.json
  2. 11 2
      packages/codemirror/style/index.css

+ 1 - 1
jupyterlab/package.json

@@ -76,9 +76,9 @@
     "glob": "^7.1.2",
     "handlebars": "^4.0.6",
     "json-loader": "^0.5.4",
+    "raw-loader": "^0.5.1",
     "sort-package-json": "^1.7.0",
     "style-loader": "^0.13.1",
-    "raw-loader": "^0.5.1",
     "url-loader": "^0.5.7",
     "webpack": "^2.2.1"
   },

+ 11 - 2
packages/codemirror/style/index.css

@@ -25,18 +25,27 @@
   font-size: var(--jp-code-font-size);
   font-family: var(--jp-code-font-family);
   height: auto;
-  background: transparent;
   /* Changed to auto to autogrow */
 }
 
 
 .CodeMirror pre {
-  color: var(--jp-mirror-editor-pre-color);
   padding: 0;
   border: 0;
   border-radius: 0;
 }
 
+
+.CodeMirror.cm-s-jupyter {
+  background: var(--jp-layout-color0);
+}
+
+
+.CodeMirror.cm-s-jupyter pre {
+  color: var(--jp-mirror-editor-pre-color);
+}
+
+
 .jp-OutputArea-output pre {
   color: var(--jp-mirror-editor-pre-color);
 }