国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
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.

342 lines
8.3KB

  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 {
  201. -webkit-user-select: none;
  202. -moz-user-select: none;
  203. user-select: none;
  204. }
  205. .CodeMirror-lines {
  206. cursor: text;
  207. min-height: 1px; /* prevents collapsing before first draw */
  208. }
  209. .CodeMirror pre {
  210. /* Reset some styles that the rest of the page might have set */
  211. -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
  212. border-width: 0;
  213. background: transparent;
  214. font-family: inherit;
  215. font-size: inherit;
  216. margin: 0;
  217. white-space: pre;
  218. word-wrap: normal;
  219. line-height: inherit;
  220. color: inherit;
  221. z-index: 2;
  222. position: relative;
  223. overflow: visible;
  224. -webkit-tap-highlight-color: transparent;
  225. -webkit-font-variant-ligatures: contextual;
  226. font-variant-ligatures: contextual;
  227. }
  228. .CodeMirror-wrap pre {
  229. word-wrap: break-word;
  230. white-space: pre-wrap;
  231. word-break: normal;
  232. }
  233. .CodeMirror-linebackground {
  234. position: absolute;
  235. left: 0; right: 0; top: 0; bottom: 0;
  236. z-index: 0;
  237. }
  238. .CodeMirror-linewidget {
  239. position: relative;
  240. z-index: 2;
  241. overflow: auto;
  242. }
  243. .CodeMirror-widget {}
  244. .CodeMirror-code {
  245. outline: none;
  246. }
  247. /* Force content-box sizing for the elements where we expect it */
  248. .CodeMirror-scroll,
  249. .CodeMirror-sizer,
  250. .CodeMirror-gutter,
  251. .CodeMirror-gutters,
  252. .CodeMirror-linenumber {
  253. -moz-box-sizing: content-box;
  254. box-sizing: content-box;
  255. }
  256. .CodeMirror-measure {
  257. position: absolute;
  258. width: 100%;
  259. height: 0;
  260. overflow: hidden;
  261. visibility: hidden;
  262. }
  263. .CodeMirror-cursor {
  264. position: absolute;
  265. pointer-events: none;
  266. }
  267. .CodeMirror-measure pre { position: static; }
  268. div.CodeMirror-cursors {
  269. visibility: hidden;
  270. position: relative;
  271. z-index: 3;
  272. }
  273. div.CodeMirror-dragcursors {
  274. visibility: visible;
  275. }
  276. .CodeMirror-focused div.CodeMirror-cursors {
  277. visibility: visible;
  278. }
  279. .CodeMirror-selected { background: #d9d9d9; }
  280. .CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
  281. .CodeMirror-crosshair { cursor: crosshair; }
  282. .CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }
  283. .CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }
  284. .cm-searching {
  285. background: #ffa;
  286. background: rgba(255, 255, 0, .4);
  287. }
  288. /* Used to force a border model for a node */
  289. .cm-force-border { padding-right: .1px; }
  290. @media print {
  291. /* Hide the cursor when printing */
  292. .CodeMirror div.CodeMirror-cursors {
  293. visibility: hidden;
  294. }
  295. }
  296. /* See issue #2901 */
  297. .cm-tab-wrap-hack:after { content: ''; }
  298. /* Help users use markselection to safely style text background */
  299. span.CodeMirror-selectedtext { background: none; }