index.css 6.4 KB

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