市场夺宝奇兵
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.

389 lines
9.3 KiB

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