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.

492 lines
8.8 KiB

8 months ago
  1. /* BASICS */
  2. .CodeMirror {
  3. /* Set height, width, borders, and global font properties here */
  4. font-family: monospace;
  5. height: 50vh;
  6. color: black;
  7. direction: ltr;
  8. }
  9. /* PADDING */
  10. .CodeMirror-lines {
  11. padding: 4px 0; /* Vertical padding around content */
  12. }
  13. .CodeMirror pre.CodeMirror-line,
  14. .CodeMirror pre.CodeMirror-line-like {
  15. padding: 0 4px; /* Horizontal padding of content */
  16. }
  17. .CodeMirror-scrollbar-filler,
  18. .CodeMirror-gutter-filler {
  19. background-color: white; /* The little square between H and V scrollbars */
  20. }
  21. /* GUTTER */
  22. .CodeMirror-gutters {
  23. border-right: 1px solid #ddd;
  24. background-color: #f7f7f7;
  25. white-space: nowrap;
  26. }
  27. .CodeMirror-linenumbers {
  28. }
  29. .CodeMirror-linenumber {
  30. padding: 0 3px 0 5px;
  31. min-width: 20px;
  32. text-align: right;
  33. color: #999;
  34. white-space: nowrap;
  35. }
  36. .CodeMirror-guttermarker {
  37. color: black;
  38. }
  39. .CodeMirror-guttermarker-subtle {
  40. color: #999;
  41. }
  42. /* CURSOR */
  43. .CodeMirror-cursor {
  44. border-left: 1px solid black;
  45. border-right: none;
  46. width: 0;
  47. }
  48. /* Shown when moving in bi-directional text */
  49. .CodeMirror div.CodeMirror-secondarycursor {
  50. border-left: 1px solid silver;
  51. }
  52. .cm-fat-cursor .CodeMirror-cursor {
  53. width: auto;
  54. border: 0 !important;
  55. background: #7e7;
  56. }
  57. .cm-fat-cursor div.CodeMirror-cursors {
  58. z-index: 1;
  59. }
  60. .cm-fat-cursor .CodeMirror-line::selection,
  61. .cm-fat-cursor .CodeMirror-line > span::selection,
  62. .cm-fat-cursor .CodeMirror-line > span > span::selection {
  63. background: transparent;
  64. }
  65. .cm-fat-cursor .CodeMirror-line::-moz-selection,
  66. .cm-fat-cursor .CodeMirror-line > span::-moz-selection,
  67. .cm-fat-cursor .CodeMirror-line > span > span::-moz-selection {
  68. background: transparent;
  69. }
  70. .cm-fat-cursor {
  71. caret-color: transparent;
  72. }
  73. @-moz-keyframes blink {
  74. 0% {
  75. }
  76. 50% {
  77. background-color: transparent;
  78. }
  79. 100% {
  80. }
  81. }
  82. @-webkit-keyframes blink {
  83. 0% {
  84. }
  85. 50% {
  86. background-color: transparent;
  87. }
  88. 100% {
  89. }
  90. }
  91. @keyframes blink {
  92. 0% {
  93. }
  94. 50% {
  95. background-color: transparent;
  96. }
  97. 100% {
  98. }
  99. }
  100. /* Can style cursor different in overwrite (non-insert) mode */
  101. .CodeMirror-overwrite .CodeMirror-cursor {
  102. }
  103. .cm-tab {
  104. display: inline-block;
  105. text-decoration: inherit;
  106. }
  107. .CodeMirror-rulers {
  108. position: absolute;
  109. left: 0;
  110. right: 0;
  111. top: -50px;
  112. bottom: 0;
  113. overflow: hidden;
  114. }
  115. .CodeMirror-ruler {
  116. border-left: 1px solid #ccc;
  117. top: 0;
  118. bottom: 0;
  119. position: absolute;
  120. }
  121. /* DEFAULT THEME */
  122. .cm-s-default .cm-header {
  123. color: blue;
  124. }
  125. .cm-s-default .cm-quote {
  126. color: #090;
  127. }
  128. .cm-negative {
  129. color: #d44;
  130. }
  131. .cm-positive {
  132. color: #292;
  133. }
  134. .cm-header,
  135. .cm-strong {
  136. font-weight: bold;
  137. }
  138. .cm-em {
  139. font-style: italic;
  140. }
  141. .cm-link {
  142. text-decoration: underline;
  143. }
  144. .cm-strikethrough {
  145. text-decoration: line-through;
  146. }
  147. .cm-s-default .cm-keyword {
  148. color: #708;
  149. }
  150. .cm-s-default .cm-atom {
  151. color: #219;
  152. }
  153. .cm-s-default .cm-number {
  154. color: #164;
  155. }
  156. .cm-s-default .cm-def {
  157. color: #00f;
  158. }
  159. .cm-s-default .cm-variable,
  160. .cm-s-default .cm-punctuation,
  161. .cm-s-default .cm-property,
  162. .cm-s-default .cm-operator {
  163. }
  164. .cm-s-default .cm-variable-2 {
  165. color: #05a;
  166. }
  167. .cm-s-default .cm-variable-3,
  168. .cm-s-default .cm-type {
  169. color: #085;
  170. }
  171. .cm-s-default .cm-comment {
  172. color: #a50;
  173. }
  174. .cm-s-default .cm-string {
  175. color: #a11;
  176. }
  177. .cm-s-default .cm-string-2 {
  178. color: #f50;
  179. }
  180. .cm-s-default .cm-meta {
  181. color: #555;
  182. }
  183. .cm-s-default .cm-qualifier {
  184. color: #555;
  185. }
  186. .cm-s-default .cm-builtin {
  187. color: #30a;
  188. }
  189. .cm-s-default .cm-bracket {
  190. color: #997;
  191. }
  192. .cm-s-default .cm-tag {
  193. color: #170;
  194. }
  195. .cm-s-default .cm-attribute {
  196. color: #00c;
  197. }
  198. .cm-s-default .cm-hr {
  199. color: #999;
  200. }
  201. .cm-s-default .cm-link {
  202. color: #00c;
  203. }
  204. .cm-s-default .cm-error {
  205. color: #f00;
  206. }
  207. .cm-invalidchar {
  208. color: #f00;
  209. }
  210. .CodeMirror-composing {
  211. border-bottom: 2px solid;
  212. }
  213. /* Default styles for common addons */
  214. div.CodeMirror span.CodeMirror-matchingbracket {
  215. color: #0b0;
  216. }
  217. div.CodeMirror span.CodeMirror-nonmatchingbracket {
  218. color: #a22;
  219. }
  220. .CodeMirror-matchingtag {
  221. background: rgba(255, 150, 0, 0.3);
  222. }
  223. .CodeMirror-activeline-background {
  224. background: #e8f2ff;
  225. }
  226. /* STOP */
  227. /* The rest of this file contains styles related to the mechanics of
  228. the editor. You probably shouldn't touch them. */
  229. .CodeMirror {
  230. position: relative;
  231. overflow: hidden;
  232. background: white;
  233. }
  234. .CodeMirror-scroll {
  235. overflow: scroll !important; /* Things will break if this is overridden */
  236. /* 50px is the magic margin used to hide the element's real scrollbars */
  237. /* See overflow: hidden in .CodeMirror */
  238. margin-bottom: -50px;
  239. margin-right: -50px;
  240. padding-bottom: 50px;
  241. height: 100%;
  242. outline: none; /* Prevent dragging from highlighting the element */
  243. position: relative;
  244. z-index: 0;
  245. }
  246. .CodeMirror-sizer {
  247. position: relative;
  248. border-right: 50px solid transparent;
  249. }
  250. /* The fake, visible scrollbars. Used to force redraw during scrolling
  251. before actual scrolling happens, thus preventing shaking and
  252. flickering artifacts. */
  253. .CodeMirror-vscrollbar,
  254. .CodeMirror-hscrollbar,
  255. .CodeMirror-scrollbar-filler,
  256. .CodeMirror-gutter-filler {
  257. position: absolute;
  258. z-index: 6;
  259. display: none;
  260. outline: none;
  261. }
  262. .CodeMirror-vscrollbar {
  263. right: 0;
  264. top: 0;
  265. overflow-x: hidden;
  266. overflow-y: scroll;
  267. }
  268. .CodeMirror-hscrollbar {
  269. bottom: 0;
  270. left: 0;
  271. overflow-y: hidden;
  272. overflow-x: scroll;
  273. }
  274. .CodeMirror-scrollbar-filler {
  275. right: 0;
  276. bottom: 0;
  277. }
  278. .CodeMirror-gutter-filler {
  279. left: 0;
  280. bottom: 0;
  281. }
  282. .CodeMirror-gutters {
  283. position: absolute;
  284. left: 0;
  285. top: 0;
  286. min-height: 100%;
  287. z-index: 3;
  288. }
  289. .CodeMirror-gutter {
  290. white-space: normal;
  291. height: 100%;
  292. display: inline-block;
  293. vertical-align: top;
  294. margin-bottom: -50px;
  295. }
  296. .CodeMirror-gutter-wrapper {
  297. position: absolute;
  298. z-index: 4;
  299. background: none !important;
  300. border: none !important;
  301. }
  302. .CodeMirror-gutter-background {
  303. position: absolute;
  304. top: 0;
  305. bottom: 0;
  306. z-index: 4;
  307. }
  308. .CodeMirror-gutter-elt {
  309. position: absolute;
  310. cursor: default;
  311. z-index: 4;
  312. }
  313. .CodeMirror-gutter-wrapper ::selection {
  314. background-color: transparent;
  315. }
  316. .CodeMirror-gutter-wrapper ::-moz-selection {
  317. background-color: transparent;
  318. }
  319. .CodeMirror-lines {
  320. cursor: text;
  321. min-height: 1px; /* prevents collapsing before first draw */
  322. }
  323. .CodeMirror pre.CodeMirror-line,
  324. .CodeMirror pre.CodeMirror-line-like {
  325. /* Reset some styles that the rest of the page might have set */
  326. -moz-border-radius: 0;
  327. -webkit-border-radius: 0;
  328. border-radius: 0;
  329. border-width: 0;
  330. background: transparent;
  331. font-family: inherit;
  332. font-size: inherit;
  333. margin: 0;
  334. white-space: pre;
  335. word-wrap: normal;
  336. line-height: inherit;
  337. color: inherit;
  338. z-index: 2;
  339. position: relative;
  340. overflow: visible;
  341. -webkit-tap-highlight-color: transparent;
  342. -webkit-font-variant-ligatures: contextual;
  343. font-variant-ligatures: contextual;
  344. }
  345. .CodeMirror-wrap pre.CodeMirror-line,
  346. .CodeMirror-wrap pre.CodeMirror-line-like {
  347. word-wrap: break-word;
  348. white-space: pre-wrap;
  349. word-break: normal;
  350. }
  351. .CodeMirror-linebackground {
  352. position: absolute;
  353. left: 0;
  354. right: 0;
  355. top: 0;
  356. bottom: 0;
  357. z-index: 0;
  358. }
  359. .CodeMirror-linewidget {
  360. position: relative;
  361. z-index: 2;
  362. padding: 0.1px; /* Force widget margins to stay inside of the container */
  363. }
  364. .CodeMirror-widget {
  365. }
  366. .CodeMirror-rtl pre {
  367. direction: rtl;
  368. }
  369. .CodeMirror-code {
  370. outline: none;
  371. }
  372. /* Force content-box sizing for the elements where we expect it */
  373. .CodeMirror-scroll,
  374. .CodeMirror-sizer,
  375. .CodeMirror-gutter,
  376. .CodeMirror-gutters,
  377. .CodeMirror-linenumber {
  378. -moz-box-sizing: content-box;
  379. box-sizing: content-box;
  380. }
  381. .CodeMirror-measure {
  382. position: absolute;
  383. width: 100%;
  384. height: 0;
  385. overflow: hidden;
  386. visibility: hidden;
  387. }
  388. .CodeMirror-cursor {
  389. position: absolute;
  390. pointer-events: none;
  391. }
  392. .CodeMirror-measure pre {
  393. position: static;
  394. }
  395. div.CodeMirror-cursors {
  396. visibility: hidden;
  397. position: relative;
  398. z-index: 3;
  399. }
  400. div.CodeMirror-dragcursors {
  401. visibility: visible;
  402. }
  403. .CodeMirror-focused div.CodeMirror-cursors {
  404. visibility: visible;
  405. }
  406. .CodeMirror-selected {
  407. background: #d9d9d9;
  408. }
  409. .CodeMirror-focused .CodeMirror-selected {
  410. background: #d7d4f0;
  411. }
  412. .CodeMirror-crosshair {
  413. cursor: crosshair;
  414. }
  415. .CodeMirror-line::selection,
  416. .CodeMirror-line > span::selection,
  417. .CodeMirror-line > span > span::selection {
  418. background: #d7d4f0;
  419. }
  420. .CodeMirror-line::-moz-selection,
  421. .CodeMirror-line > span::-moz-selection,
  422. .CodeMirror-line > span > span::-moz-selection {
  423. background: #d7d4f0;
  424. }
  425. .cm-searching {
  426. background-color: #ffa;
  427. background-color: rgba(255, 255, 0, 0.4);
  428. }
  429. -cm-secondInput {
  430. height: 5vh !important;
  431. }
  432. /* Used to force a border model for a node */
  433. .cm-force-border {
  434. padding-right: 0.1px;
  435. }
  436. @media print {
  437. /* Hide the cursor when printing */
  438. .CodeMirror div.CodeMirror-cursors {
  439. visibility: hidden;
  440. }
  441. }
  442. /* See issue #2901 */
  443. .cm-tab-wrap-hack:after {
  444. content: "";
  445. }
  446. /* Help users use markselection to safely style text background */
  447. span.CodeMirror-selectedtext {
  448. background: none;
  449. }