index.css 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  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,
  48. .jp-CodeMirrorEditor-static {
  49. cursor: text;
  50. }
  51. .jp-CodeMirrorEditor[data-type='inline'] .CodeMirror-cursor {
  52. border-left: 1.4px solid var(--jp-editor-cursor-color);
  53. }
  54. /* When zoomed out 67% and 33% on a screen of 1440 width x 900 height */
  55. @media screen and (min-width: 2138px) and (max-width: 4319px) {
  56. .jp-CodeMirrorEditor[data-type='inline'] .CodeMirror-cursor {
  57. border-left: 2px solid var(--jp-editor-cursor-color);
  58. }
  59. }
  60. /* When zoomed out less than 33% */
  61. @media screen and (min-width: 4320px) {
  62. .jp-CodeMirrorEditor[data-type='inline'] .CodeMirror-cursor {
  63. border-left: 4px solid var(--jp-editor-cursor-color);
  64. }
  65. }
  66. .CodeMirror.jp-mod-readOnly .CodeMirror-cursor {
  67. display: none;
  68. }
  69. .CodeMirror-gutters {
  70. border-right: 1px solid var(--jp-border-color2);
  71. background-color: var(--jp-layout-color2);
  72. }
  73. .CodeMirror-gutter-wrapper {
  74. margin-left: calc(-1 * var(--jp-code-padding));
  75. }
  76. .jp-CollaboratorCursor {
  77. border-left: 5px solid transparent;
  78. border-right: 5px solid transparent;
  79. border-top: none;
  80. border-bottom: 3px solid;
  81. background-clip: content-box;
  82. margin-left: -5px;
  83. margin-right: -5px;
  84. }
  85. .CodeMirror-focused .CodeMirror-selected {
  86. background-color: var(--jp-editor-selected-focused-background);
  87. }
  88. .CodeMirror-selected {
  89. background-color: var(--jp-editor-selected-background);
  90. }
  91. .jp-CollaboratorCursor-hover {
  92. position: absolute;
  93. z-index: 1;
  94. transform: translateX(-50%);
  95. color: white;
  96. border-radius: 3px;
  97. padding-left: 4px;
  98. padding-right: 4px;
  99. padding-top: 1px;
  100. padding-bottom: 1px;
  101. text-align: center;
  102. font-size: var(--jp-ui-font-size1);
  103. white-space: nowrap;
  104. }
  105. /**
  106. * Here is our jupyter theme for CodeMirror syntax highlighting
  107. * This is used in our marked.js syntax highlighting and CodeMirror itself
  108. * The string "jupyter" is set in ../codemirror/widget.DEFAULT_CODEMIRROR_THEME
  109. * This came from the classic notebook, which came form highlight.js/GitHub
  110. */
  111. /**
  112. * CodeMirror themes are handling the background/color in this way. This works
  113. * fine for CodeMirror editors outside the notebook, but the notebook styles
  114. * these things differently.
  115. */
  116. .CodeMirror.cm-s-jupyter {
  117. background: var(--jp-layout-color0);
  118. color: var(--jp-content-font-color1);
  119. }
  120. /* In the notebook, we want this styling to be handled by its container */
  121. .jp-CodeConsole .CodeMirror.cm-s-jupyter,
  122. .jp-Notebook .CodeMirror.cm-s-jupyter {
  123. background: transparent;
  124. }
  125. .cm-s-jupyter .CodeMirror-cursor {
  126. border-left: 1.4px solid var(--jp-editor-cursor-color);
  127. }
  128. .cm-s-jupyter span.cm-keyword {
  129. color: var(--jp-mirror-editor-keyword-color);
  130. font-weight: bold;
  131. }
  132. .cm-s-jupyter span.cm-atom {
  133. color: var(--jp-mirror-editor-atom-color);
  134. }
  135. .cm-s-jupyter span.cm-number {
  136. color: var(--jp-mirror-editor-number-color);
  137. }
  138. .cm-s-jupyter span.cm-def {
  139. color: var(--jp-mirror-editor-def-color);
  140. }
  141. .cm-s-jupyter span.cm-variable {
  142. color: var(--jp-mirror-editor-variable-color);
  143. }
  144. .cm-s-jupyter span.cm-variable-2 {
  145. color: var(--jp-mirror-editor-variable-2-color);
  146. }
  147. .cm-s-jupyter span.cm-variable-3 {
  148. color: var(--jp-mirror-editor-variable-3-color);
  149. }
  150. .cm-s-jupyter span.cm-punctuation {
  151. color: var(--jp-mirror-editor-punctuation-color);
  152. }
  153. .cm-s-jupyter span.cm-property {
  154. color: var(--jp-mirror-editor-property-color);
  155. }
  156. .cm-s-jupyter span.cm-operator {
  157. color: var(--jp-mirror-editor-operator-color);
  158. font-weight: bold;
  159. }
  160. .cm-s-jupyter span.cm-comment {
  161. color: var(--jp-mirror-editor-comment-color);
  162. font-style: italic;
  163. }
  164. .cm-s-jupyter span.cm-string {
  165. color: var(--jp-mirror-editor-string-color);
  166. }
  167. .cm-s-jupyter span.cm-string-2 {
  168. color: var(--jp-mirror-editor-string-2-color);
  169. }
  170. .cm-s-jupyter span.cm-meta {
  171. color: var(--jp-mirror-editor-meta-color);
  172. }
  173. .cm-s-jupyter span.cm-qualifier {
  174. color: var(--jp-mirror-editor-qualifier-color);
  175. }
  176. .cm-s-jupyter span.cm-builtin {
  177. color: var(--jp-mirror-editor-builtin-color);
  178. }
  179. .cm-s-jupyter span.cm-bracket {
  180. color: var(--jp-mirror-editor-bracket-color);
  181. }
  182. .cm-s-jupyter span.cm-tag {
  183. color: var(--jp-mirror-editor-tag-color);
  184. }
  185. .cm-s-jupyter span.cm-attribute {
  186. color: var(--jp-mirror-editor-attribute-color);
  187. }
  188. .cm-s-jupyter span.cm-header {
  189. color: var(--jp-mirror-editor-header-color);
  190. }
  191. .cm-s-jupyter span.cm-quote {
  192. color: var(--jp-mirror-editor-quote-color);
  193. }
  194. .cm-s-jupyter span.cm-link {
  195. color: var(--jp-mirror-editor-link-color);
  196. }
  197. .cm-s-jupyter span.cm-error {
  198. color: var(--jp-mirror-editor-error-color);
  199. }
  200. .cm-s-jupyter span.cm-hr {
  201. color: #999;
  202. }
  203. .cm-s-jupyter span.cm-tab {
  204. background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAMCAYAAAAkuj5RAAAAAXNSR0IArs4c6QAAAGFJREFUSMft1LsRQFAQheHPowAKoACx3IgEKtaEHujDjORSgWTH/ZOdnZOcM/sgk/kFFWY0qV8foQwS4MKBCS3qR6ixBJvElOobYAtivseIE120FaowJPN75GMu8j/LfMwNjh4HUpwg4LUAAAAASUVORK5CYII=);
  205. background-position: right;
  206. background-repeat: no-repeat;
  207. }