Theme Inspinia
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 7.2KB

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