瀏覽代碼

Allow other themes to set background and color

Steven Silvester 7 年之前
父節點
當前提交
3756b9d9bd
共有 2 個文件被更改,包括 14 次插入3 次删除
  1. 1 1
      jupyterlab/package.json
  2. 13 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"
   },

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

@@ -25,23 +25,34 @@
   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);
 }
 
 
+
+
 /* This causes https://github.com/jupyter/jupyterlab/issues/522 */
 /* May not cause it not because we changed it! */
 .CodeMirror-lines {