No Description
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.

codemirror.css 8.5KB

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