index.css 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. /*-----------------------------------------------------------------------------
  2. | Copyright (c) Jupyter Development Team.
  3. | Distributed under the terms of the Modified BSD License.
  4. |----------------------------------------------------------------------------*/
  5. @import url('~codemirror/lib/codemirror.css');
  6. @import url('~codemirror/addon/dialog/dialog.css');
  7. @import url('~codemirror/theme/material.css');
  8. @import url('~codemirror/theme/zenburn.css');
  9. @import url('~codemirror/theme/abcdef.css');
  10. @import url('~codemirror/theme/base16-light.css');
  11. @import url('~codemirror/theme/base16-dark.css');
  12. @import url('~codemirror/theme/dracula.css');
  13. @import url('~codemirror/theme/hopscotch.css');
  14. @import url('~codemirror/theme/mbo.css');
  15. @import url('~codemirror/theme/mdn-like.css');
  16. @import url('~codemirror/theme/seti.css');
  17. @import url('~codemirror/theme/the-matrix.css');
  18. @import url('~codemirror/theme/xq-light.css');
  19. .CodeMirror {
  20. line-height: var(--jp-code-line-height);
  21. font-size: var(--jp-code-font-size);
  22. font-family: var(--jp-code-font-family);
  23. height: auto;
  24. /* Changed to auto to autogrow */
  25. }
  26. .CodeMirror pre {
  27. padding: 0;
  28. border: 0;
  29. border-radius: 0;
  30. }
  31. /* This causes https://github.com/jupyter/jupyterlab/issues/522 */
  32. /* May not cause it not because we changed it! */
  33. .CodeMirror-lines {
  34. padding: var(--jp-code-padding);
  35. }
  36. .CodeMirror-linenumbers {
  37. padding: 0 4px 0 4px;
  38. }
  39. .jp-CodeMirrorEditor-static {
  40. margin: var(--jp-code-padding);
  41. }
  42. .jp-CodeMirrorEditor, .jp-CodeMirrorEditor-static {
  43. cursor: text;
  44. }
  45. /* Hide dialogs in inline editors due to poor UX with small editors. */
  46. .jp-CodeMirrorEditor[data-type="inline"] .CodeMirror-dialog {
  47. display: none;
  48. }
  49. .CodeMirror-cursor {
  50. border-left: 1px solid var(--jp-editor-cursor-color);
  51. }
  52. .CodeMirror.jp-mod-readOnly .CodeMirror-cursor {
  53. display: none;
  54. }
  55. .CodeMirror-gutters {
  56. border-right: 1px solid var(--jp-border-color2);
  57. background-color: var(--jp-layout-color2);
  58. }
  59. .CodeMirror-gutter-wrapper {
  60. margin-left: calc(-1 * var(--jp-code-padding));
  61. }
  62. .jp-CollaboratorCursor {
  63. border-left: 5px solid transparent;
  64. border-right: 5px solid transparent;
  65. border-top: none;
  66. border-bottom: 3px solid;
  67. background-clip: content-box;
  68. margin-left: -5px;
  69. margin-right: -5px;
  70. }
  71. .CodeMirror-focused .CodeMirror-selected {
  72. background-color: var(--jp-editor-selected-focused-background);
  73. }
  74. .CodeMirror-selected {
  75. background-color: var(--jp-editor-selected-background)
  76. }
  77. .jp-CollaboratorCursor-hover {
  78. position: absolute;
  79. z-index: 1;
  80. transform: translateX(-50%);
  81. color: white;
  82. border-radius: 3px;
  83. padding-left: 4px;
  84. padding-right: 4px;
  85. padding-top: 1px;
  86. padding-bottom: 1px;
  87. text-align: center;
  88. font-size: var(--jp-ui-font-size1);
  89. white-space: nowrap;
  90. }
  91. /**
  92. * Here is our jupyter theme for CodeMirror syntax highlighting
  93. * This is used in our marked.js syntax highlighting and CodeMirror itself
  94. * The string "jupyter" is set in ../codemirror/widget.DEFAULT_CODEMIRROR_THEME
  95. * This came from the classic notebook, which came form highlight.js/GitHub
  96. */
  97. /**
  98. * CodeMirror themes are handling the background/color in this way. This works
  99. * fine for CodeMirror editors outside the notebook, but the notebook styles
  100. * these things differently.
  101. */
  102. .CodeMirror.cm-s-jupyter {
  103. background: var(--jp-layout-color0);
  104. color: var(--jp-content-font-color1);
  105. }
  106. /* In the notebook, we want this styling to be handled by its container */
  107. .jp-CodeConsole .CodeMirror.cm-s-jupyter, .jp-Notebook .CodeMirror.cm-s-jupyter {
  108. background: transparent;
  109. }
  110. .cm-s-jupyter span.cm-keyword { color: var(--jp-mirror-editor-keyword-color); font-weight: bold; }
  111. .cm-s-jupyter span.cm-atom { color: var(--jp-mirror-editor-atom-color); }
  112. .cm-s-jupyter span.cm-number { color: var(--jp-mirror-editor-number-color); }
  113. .cm-s-jupyter span.cm-def { color: var(--jp-mirror-editor-def-color); }
  114. .cm-s-jupyter span.cm-variable { color: var(--jp-mirror-editor-variable-color) }
  115. .cm-s-jupyter span.cm-variable-2 { color: var(--jp-mirror-editor-variable-2-color) }
  116. .cm-s-jupyter span.cm-variable-3 { color: var(--jp-mirror-editor-variable-3-color) }
  117. .cm-s-jupyter span.cm-punctuation { color: var(--jp-mirror-editor-punctuation-color); }
  118. .cm-s-jupyter span.cm-property { color: var(--jp-mirror-editor-property-color); }
  119. .cm-s-jupyter span.cm-operator { color: var(--jp-mirror-editor-operator-color); font-weight: bold; }
  120. .cm-s-jupyter span.cm-comment { color: var(--jp-mirror-editor-comment-color); font-style: italic; }
  121. .cm-s-jupyter span.cm-string { color: var(--jp-mirror-editor-string-color); }
  122. .cm-s-jupyter span.cm-string-2 { color: var(--jp-mirror-editor-string-2-color); }
  123. .cm-s-jupyter span.cm-meta { color: var(--jp-mirror-editor-meta-color); }
  124. .cm-s-jupyter span.cm-qualifier { color: var(--jp-mirror-editor-qualifier-color); }
  125. .cm-s-jupyter span.cm-builtin { color: var(--jp-mirror-editor-builtin-color); }
  126. .cm-s-jupyter span.cm-bracket { color: var(--jp-mirror-editor-bracket-color); }
  127. .cm-s-jupyter span.cm-tag { color: var(--jp-mirror-editor-tag-color); }
  128. .cm-s-jupyter span.cm-attribute { color: var(--jp-mirror-editor-attribute-color); }
  129. .cm-s-jupyter span.cm-header { color: var(--jp-mirror-editor-header-color); }
  130. .cm-s-jupyter span.cm-quote { color: var(--jp-mirror-editor-quote-color); }
  131. .cm-s-jupyter span.cm-link { color: var(--jp-mirror-editor-link-color); }
  132. .cm-s-jupyter span.cm-error { color: var(--jp-mirror-editor-error-color); }
  133. .cm-s-jupyter span.cm-hr { color: #999; }
  134. .cm-s-jupyter span.cm-tab {
  135. background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAMCAYAAAAkuj5RAAAAAXNSR0IArs4c6QAAAGFJREFUSMft1LsRQFAQheHPowAKoACx3IgEKtaEHujDjORSgWTH/ZOdnZOcM/sgk/kFFWY0qV8foQwS4MKBCS3qR6ixBJvElOobYAtivseIE120FaowJPN75GMu8j/LfMwNjh4HUpwg4LUAAAAASUVORK5CYII=);
  136. background-position: right;
  137. background-repeat: no-repeat;
  138. }