not really known
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

340 lines
8.0 KiB

  1. /* BASICS */
  2. .CodeMirror {
  3. /* Set height, width, borders, and global font properties here */
  4. font-family: monospace;
  5. height: 300px;
  6. color: black;
  7. }
  8. /* PADDING */
  9. .CodeMirror-lines {
  10. padding: 4px 0; /* Vertical padding around content */
  11. }
  12. .CodeMirror pre {
  13. padding: 0 4px; /* Horizontal padding of content */
  14. }
  15. .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
  16. background-color: white; /* The little square between H and V scrollbars */
  17. }
  18. /* GUTTER */
  19. .CodeMirror-gutters {
  20. border-right: 1px solid #ddd;
  21. background-color: #f7f7f7;
  22. white-space: nowrap;
  23. }
  24. .CodeMirror-linenumbers {}
  25. .CodeMirror-linenumber {
  26. padding: 0 3px 0 5px;
  27. min-width: 20px;
  28. text-align: right;
  29. color: #999;
  30. white-space: nowrap;
  31. }
  32. .CodeMirror-guttermarker { color: black; }
  33. .CodeMirror-guttermarker-subtle { color: #999; }
  34. /* CURSOR */
  35. .CodeMirror-cursor {
  36. border-left: 1px solid black;
  37. border-right: none;
  38. width: 0;
  39. }
  40. /* Shown when moving in bi-directional text */
  41. .CodeMirror div.CodeMirror-secondarycursor {
  42. border-left: 1px solid silver;
  43. }
  44. .cm-fat-cursor .CodeMirror-cursor {
  45. width: auto;
  46. border: 0 !important;
  47. background: #7e7;
  48. }
  49. .cm-fat-cursor div.CodeMirror-cursors {
  50. z-index: 1;
  51. }
  52. .cm-animate-fat-cursor {
  53. width: auto;
  54. border: 0;
  55. -webkit-animation: blink 1.06s steps(1) infinite;
  56. -moz-animation: blink 1.06s steps(1) infinite;
  57. animation: blink 1.06s steps(1) infinite;
  58. background-color: #7e7;
  59. }
  60. @-moz-keyframes blink {
  61. 0% {}
  62. 50% { background-color: transparent; }
  63. 100% {}
  64. }
  65. @-webkit-keyframes blink {
  66. 0% {}
  67. 50% { background-color: transparent; }
  68. 100% {}
  69. }
  70. @keyframes blink {
  71. 0% {}
  72. 50% { background-color: transparent; }
  73. 100% {}
  74. }
  75. /* Can style cursor different in overwrite (non-insert) mode */
  76. .CodeMirror-overwrite .CodeMirror-cursor {}
  77. .cm-tab { display: inline-block; text-decoration: inherit; }
  78. .CodeMirror-rulers {
  79. position: absolute;
  80. left: 0; right: 0; top: -50px; bottom: -20px;
  81. overflow: hidden;
  82. }
  83. .CodeMirror-ruler {
  84. border-left: 1px solid #ccc;
  85. top: 0; bottom: 0;
  86. position: absolute;
  87. }
  88. /* DEFAULT THEME */
  89. .cm-s-default .cm-header {color: blue;}
  90. .cm-s-default .cm-quote {color: #090;}
  91. .cm-negative {color: #d44;}
  92. .cm-positive {color: #292;}
  93. .cm-header, .cm-strong {font-weight: bold;}
  94. .cm-em {font-style: italic;}
  95. .cm-link {text-decoration: underline;}
  96. .cm-strikethrough {text-decoration: line-through;}
  97. .cm-s-default .cm-keyword {color: #708;}
  98. .cm-s-default .cm-atom {color: #219;}
  99. .cm-s-default .cm-number {color: #164;}
  100. .cm-s-default .cm-def {color: #00f;}
  101. .cm-s-default .cm-variable,
  102. .cm-s-default .cm-punctuation,
  103. .cm-s-default .cm-property,
  104. .cm-s-default .cm-operator {}
  105. .cm-s-default .cm-variable-2 {color: #05a;}
  106. .cm-s-default .cm-variable-3 {color: #085;}
  107. .cm-s-default .cm-comment {color: #a50;}
  108. .cm-s-default .cm-string {color: #a11;}
  109. .cm-s-default .cm-string-2 {color: #f50;}
  110. .cm-s-default .cm-meta {color: #555;}
  111. .cm-s-default .cm-qualifier {color: #555;}
  112. .cm-s-default .cm-builtin {color: #30a;}
  113. .cm-s-default .cm-bracket {color: #997;}
  114. .cm-s-default .cm-tag {color: #170;}
  115. .cm-s-default .cm-attribute {color: #00c;}
  116. .cm-s-default .cm-hr {color: #999;}
  117. .cm-s-default .cm-link {color: #00c;}
  118. .cm-s-default .cm-error {color: #f00;}
  119. .cm-invalidchar {color: #f00;}
  120. .CodeMirror-composing { border-bottom: 2px solid; }
  121. /* Default styles for common addons */
  122. div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
  123. div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
  124. .CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
  125. .CodeMirror-activeline-background {background: #e8f2ff;}
  126. /* STOP */
  127. /* The rest of this file contains styles related to the mechanics of
  128. the editor. You probably shouldn't touch them. */
  129. .CodeMirror {
  130. position: relative;
  131. overflow: hidden;
  132. background: white;
  133. }
  134. .CodeMirror-scroll {
  135. overflow: scroll !important; /* Things will break if this is overridden */
  136. /* 30px is the magic margin used to hide the element's real scrollbars */
  137. /* See overflow: hidden in .CodeMirror */
  138. margin-bottom: -30px; margin-right: -30px;
  139. padding-bottom: 30px;
  140. height: 100%;
  141. outline: none; /* Prevent dragging from highlighting the element */
  142. position: relative;
  143. }
  144. .CodeMirror-sizer {
  145. position: relative;
  146. border-right: 30px solid transparent;
  147. }
  148. /* The fake, visible scrollbars. Used to force redraw during scrolling
  149. before actual scrolling happens, thus preventing shaking and
  150. flickering artifacts. */
  151. .CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
  152. position: absolute;
  153. z-index: 6;
  154. display: none;
  155. }
  156. .CodeMirror-vscrollbar {
  157. right: 0; top: 0;
  158. overflow-x: hidden;
  159. overflow-y: scroll;
  160. }
  161. .CodeMirror-hscrollbar {
  162. bottom: 0; left: 0;
  163. overflow-y: hidden;
  164. overflow-x: scroll;
  165. }
  166. .CodeMirror-scrollbar-filler {
  167. right: 0; bottom: 0;
  168. }
  169. .CodeMirror-gutter-filler {
  170. left: 0; bottom: 0;
  171. }
  172. .CodeMirror-gutters {
  173. position: absolute; left: 0; top: 0;
  174. min-height: 100%;
  175. z-index: 3;
  176. }
  177. .CodeMirror-gutter {
  178. white-space: normal;
  179. height: 100%;
  180. display: inline-block;
  181. vertical-align: top;
  182. margin-bottom: -30px;
  183. }
  184. .CodeMirror-gutter-wrapper {
  185. position: absolute;
  186. z-index: 4;
  187. background: none !important;
  188. border: none !important;
  189. }
  190. .CodeMirror-gutter-background {
  191. position: absolute;
  192. top: 0; bottom: 0;
  193. z-index: 4;
  194. }
  195. .CodeMirror-gutter-elt {
  196. position: absolute;
  197. cursor: default;
  198. z-index: 4;
  199. }
  200. .CodeMirror-gutter-wrapper ::selection { background-color: transparent }
  201. .CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }
  202. .CodeMirror-lines {
  203. cursor: text;
  204. min-height: 1px; /* prevents collapsing before first draw */
  205. }
  206. .CodeMirror pre {
  207. /* Reset some styles that the rest of the page might have set */
  208. -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
  209. border-width: 0;
  210. background: transparent;
  211. font-family: inherit;
  212. font-size: inherit;
  213. margin: 0;
  214. white-space: pre;
  215. word-wrap: normal;
  216. line-height: inherit;
  217. color: inherit;
  218. z-index: 2;
  219. position: relative;
  220. overflow: visible;
  221. -webkit-tap-highlight-color: transparent;
  222. -webkit-font-variant-ligatures: contextual;
  223. font-variant-ligatures: contextual;
  224. }
  225. .CodeMirror-wrap pre {
  226. word-wrap: break-word;
  227. white-space: pre-wrap;
  228. word-break: normal;
  229. }
  230. .CodeMirror-linebackground {
  231. position: absolute;
  232. left: 0; right: 0; top: 0; bottom: 0;
  233. z-index: 0;
  234. }
  235. .CodeMirror-linewidget {
  236. position: relative;
  237. z-index: 2;
  238. overflow: auto;
  239. }
  240. .CodeMirror-widget {}
  241. .CodeMirror-rtl pre { direction: rtl; }
  242. .CodeMirror-code {
  243. outline: none;
  244. }
  245. /* Force content-box sizing for the elements where we expect it */
  246. .CodeMirror-scroll,
  247. .CodeMirror-sizer,
  248. .CodeMirror-gutter,
  249. .CodeMirror-gutters,
  250. .CodeMirror-linenumber {
  251. -moz-box-sizing: content-box;
  252. box-sizing: content-box;
  253. }
  254. .CodeMirror-measure {
  255. position: absolute;
  256. width: 100%;
  257. height: 0;
  258. overflow: hidden;
  259. visibility: hidden;
  260. }
  261. .CodeMirror-cursor {
  262. position: absolute;
  263. pointer-events: none;
  264. }
  265. .CodeMirror-measure pre { position: static; }
  266. div.CodeMirror-cursors {
  267. visibility: hidden;
  268. position: relative;
  269. z-index: 3;
  270. }
  271. div.CodeMirror-dragcursors {
  272. visibility: visible;
  273. }
  274. .CodeMirror-focused div.CodeMirror-cursors {
  275. visibility: visible;
  276. }
  277. .CodeMirror-selected { background: #d9d9d9; }
  278. .CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
  279. .CodeMirror-crosshair { cursor: crosshair; }
  280. .CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }
  281. .CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }
  282. .cm-searching {
  283. background: #ffa;
  284. background: rgba(255, 255, 0, .4);
  285. }
  286. /* Used to force a border model for a node */
  287. .cm-force-border { padding-right: .1px; }
  288. @media print {
  289. /* Hide the cursor when printing */
  290. .CodeMirror div.CodeMirror-cursors {
  291. visibility: hidden;
  292. }
  293. }
  294. /* See issue #2901 */
  295. .cm-tab-wrap-hack:after { content: ''; }
  296. /* Help users use markselection to safely style text background */
  297. span.CodeMirror-selectedtext { background: none; }