Bez popisu
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.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342
  1. /* BASICS */
  2. .CodeMirror {
  3. /* Set height, width, borders, and global font properties here */
  4. font-family: monospace;
  5. height: 600px;
  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. border: solid 1px #eee;
  134. }
  135. .CodeMirror-scroll {
  136. overflow: scroll !important; /* Things will break if this is overridden */
  137. /* 30px is the magic margin used to hide the element's real scrollbars */
  138. /* See overflow: hidden in .CodeMirror */
  139. margin-bottom: -30px; margin-right: -30px;
  140. padding-bottom: 30px;
  141. height: 100%;
  142. outline: none; /* Prevent dragging from highlighting the element */
  143. position: relative;
  144. }
  145. .CodeMirror-sizer {
  146. position: relative;
  147. border-right: 30px solid transparent;
  148. }
  149. /* The fake, visible scrollbars. Used to force redraw during scrolling
  150. before actual scrolling happens, thus preventing shaking and
  151. flickering artifacts. */
  152. .CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
  153. position: absolute;
  154. z-index: 6;
  155. display: none;
  156. }
  157. .CodeMirror-vscrollbar {
  158. right: 0; top: 0;
  159. overflow-x: hidden;
  160. overflow-y: scroll;
  161. }
  162. .CodeMirror-hscrollbar {
  163. bottom: 0; left: 0;
  164. overflow-y: hidden;
  165. overflow-x: scroll;
  166. }
  167. .CodeMirror-scrollbar-filler {
  168. right: 0; bottom: 0;
  169. }
  170. .CodeMirror-gutter-filler {
  171. left: 0; bottom: 0;
  172. }
  173. .CodeMirror-gutters {
  174. position: absolute; left: 0; top: 0;
  175. min-height: 100%;
  176. z-index: 3;
  177. }
  178. .CodeMirror-gutter {
  179. white-space: normal;
  180. height: 100%;
  181. display: inline-block;
  182. vertical-align: top;
  183. margin-bottom: -30px;
  184. }
  185. .CodeMirror-gutter-wrapper {
  186. position: absolute;
  187. z-index: 4;
  188. background: none !important;
  189. border: none !important;
  190. }
  191. .CodeMirror-gutter-background {
  192. position: absolute;
  193. top: 0; bottom: 0;
  194. z-index: 4;
  195. }
  196. .CodeMirror-gutter-elt {
  197. position: absolute;
  198. cursor: default;
  199. z-index: 4;
  200. }
  201. .CodeMirror-gutter-wrapper {
  202. -webkit-user-select: none;
  203. -moz-user-select: none;
  204. user-select: none;
  205. }
  206. .CodeMirror-lines {
  207. cursor: text;
  208. min-height: 1px; /* prevents collapsing before first draw */
  209. }
  210. .CodeMirror pre {
  211. /* Reset some styles that the rest of the page might have set */
  212. -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
  213. border-width: 0;
  214. background: transparent;
  215. font-family: inherit;
  216. font-size: inherit;
  217. margin: 0;
  218. white-space: pre;
  219. word-wrap: normal;
  220. line-height: inherit;
  221. color: inherit;
  222. z-index: 2;
  223. position: relative;
  224. overflow: visible;
  225. -webkit-tap-highlight-color: transparent;
  226. -webkit-font-variant-ligatures: contextual;
  227. font-variant-ligatures: contextual;
  228. }
  229. .CodeMirror-wrap pre {
  230. word-wrap: break-word;
  231. white-space: pre-wrap;
  232. word-break: normal;
  233. }
  234. .CodeMirror-linebackground {
  235. position: absolute;
  236. left: 0; right: 0; top: 0; bottom: 0;
  237. z-index: 0;
  238. }
  239. .CodeMirror-linewidget {
  240. position: relative;
  241. z-index: 2;
  242. overflow: auto;
  243. }
  244. .CodeMirror-widget {}
  245. .CodeMirror-code {
  246. outline: none;
  247. }
  248. /* Force content-box sizing for the elements where we expect it */
  249. .CodeMirror-scroll,
  250. .CodeMirror-sizer,
  251. .CodeMirror-gutter,
  252. .CodeMirror-gutters,
  253. .CodeMirror-linenumber {
  254. -moz-box-sizing: content-box;
  255. box-sizing: content-box;
  256. }
  257. .CodeMirror-measure {
  258. position: absolute;
  259. width: 100%;
  260. height: 0;
  261. overflow: hidden;
  262. visibility: hidden;
  263. }
  264. .CodeMirror-cursor {
  265. position: absolute;
  266. pointer-events: none;
  267. }
  268. .CodeMirror-measure pre { position: static; }
  269. div.CodeMirror-cursors {
  270. visibility: hidden;
  271. position: relative;
  272. z-index: 3;
  273. }
  274. div.CodeMirror-dragcursors {
  275. visibility: visible;
  276. }
  277. .CodeMirror-focused div.CodeMirror-cursors {
  278. visibility: visible;
  279. }
  280. .CodeMirror-selected { background: #d9d9d9; }
  281. .CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
  282. .CodeMirror-crosshair { cursor: crosshair; }
  283. .CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }
  284. .CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }
  285. .cm-searching {
  286. background: #ffa;
  287. background: rgba(255, 255, 0, .4);
  288. }
  289. /* Used to force a border model for a node */
  290. .cm-force-border { padding-right: .1px; }
  291. @media print {
  292. /* Hide the cursor when printing */
  293. .CodeMirror div.CodeMirror-cursors {
  294. visibility: hidden;
  295. }
  296. }
  297. /* See issue #2901 */
  298. .cm-tab-wrap-hack:after { content: ''; }
  299. /* Help users use markselection to safely style text background */
  300. span.CodeMirror-selectedtext { background: none; }