codemirror.css 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. .CodeMirror {
  2. line-height: 1em;
  3. font-family: monospace;
  4. /* Necessary so the scrollbar can be absolutely positioned within the wrapper on Lion. */
  5. position: relative;
  6. /* This prevents unwanted scrollbars from showing up on the body and wrapper in IE. */
  7. overflow: hidden;
  8. }
  9. .CodeMirror-scroll {
  10. overflow: auto;
  11. height: 300px;
  12. /* This is needed to prevent an IE[67] bug where the scrolled content
  13. is visible outside of the scrolling box. */
  14. position: relative;
  15. outline: none;
  16. }
  17. /* Vertical scrollbar */
  18. .CodeMirror-scrollbar {
  19. position: absolute;
  20. right: 0; top: 0;
  21. overflow-x: hidden;
  22. overflow-y: scroll;
  23. z-index: 5;
  24. }
  25. .CodeMirror-scrollbar-inner {
  26. /* This needs to have a nonzero width in order for the scrollbar to appear
  27. in Firefox and IE9. */
  28. width: 1px;
  29. }
  30. .CodeMirror-scrollbar.cm-sb-overlap {
  31. /* Ensure that the scrollbar appears in Lion, and that it overlaps the content
  32. rather than sitting to the right of it. */
  33. position: absolute;
  34. z-index: 1;
  35. float: none;
  36. right: 0;
  37. min-width: 12px;
  38. }
  39. .CodeMirror-scrollbar.cm-sb-nonoverlap {
  40. min-width: 12px;
  41. }
  42. .CodeMirror-scrollbar.cm-sb-ie7 {
  43. min-width: 18px;
  44. }
  45. .CodeMirror-gutter {
  46. position: absolute; left: 0; top: 0;
  47. z-index: 10;
  48. background-color: #f7f7f7;
  49. border-right: 1px solid #eee;
  50. min-width: 2em;
  51. height: 100%;
  52. }
  53. .CodeMirror-gutter-text {
  54. color: #aaa;
  55. text-align: right;
  56. padding: .4em .2em .4em .4em;
  57. white-space: pre !important;
  58. cursor: default;
  59. }
  60. .CodeMirror-lines {
  61. padding: .4em;
  62. white-space: pre;
  63. cursor: text;
  64. }
  65. .CodeMirror pre {
  66. -moz-border-radius: 0;
  67. -webkit-border-radius: 0;
  68. -o-border-radius: 0;
  69. border-radius: 0;
  70. border-width: 0; margin: 0; padding: 0; background: transparent;
  71. font-family: inherit;
  72. font-size: inherit;
  73. padding: 0; margin: 0;
  74. white-space: pre;
  75. word-wrap: normal;
  76. line-height: inherit;
  77. color: inherit;
  78. overflow: visible;
  79. }
  80. .CodeMirror-wrap pre {
  81. word-wrap: break-word;
  82. white-space: pre-wrap;
  83. word-break: normal;
  84. }
  85. .CodeMirror-wrap .CodeMirror-scroll {
  86. overflow-x: hidden;
  87. }
  88. .CodeMirror textarea {
  89. outline: none !important;
  90. }
  91. .CodeMirror pre.CodeMirror-cursor {
  92. z-index: 10;
  93. position: absolute;
  94. visibility: hidden;
  95. border-left: 1px solid black;
  96. border-right: none;
  97. width: 0;
  98. }
  99. .cm-keymap-fat-cursor pre.CodeMirror-cursor {
  100. width: auto;
  101. border: 0;
  102. background: transparent;
  103. background: rgba(0, 200, 0, .4);
  104. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#6600c800, endColorstr=#4c00c800);
  105. }
  106. /* Kludge to turn off filter in ie9+, which also accepts rgba */
  107. .cm-keymap-fat-cursor pre.CodeMirror-cursor:not(#nonsense_id) {
  108. filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
  109. }
  110. .CodeMirror pre.CodeMirror-cursor.CodeMirror-overwrite {}
  111. .CodeMirror-focused pre.CodeMirror-cursor {
  112. visibility: visible;
  113. }
  114. div.CodeMirror-selected { background: #d9d9d9; }
  115. .CodeMirror-focused div.CodeMirror-selected { background: #d7d4f0; }
  116. .CodeMirror-searching {
  117. background: #ffa;
  118. background: rgba(255, 255, 0, .4);
  119. }
  120. /* Default theme */
  121. .cm-s-default span.cm-keyword {color: #708;}
  122. .cm-s-default span.cm-atom {color: #219;}
  123. .cm-s-default span.cm-number {color: #164;}
  124. .cm-s-default span.cm-def {color: #00f;}
  125. .cm-s-default span.cm-variable {color: black;}
  126. .cm-s-default span.cm-variable-2 {color: #05a;}
  127. .cm-s-default span.cm-variable-3 {color: #085;}
  128. .cm-s-default span.cm-property {color: black;}
  129. .cm-s-default span.cm-operator {color: black;}
  130. .cm-s-default span.cm-comment {color: #a50;}
  131. .cm-s-default span.cm-string {color: #a11;}
  132. .cm-s-default span.cm-string-2 {color: #f50;}
  133. .cm-s-default span.cm-meta {color: #555;}
  134. .cm-s-default span.cm-error {color: #f00;}
  135. .cm-s-default span.cm-qualifier {color: #555;}
  136. .cm-s-default span.cm-builtin {color: #30a;}
  137. .cm-s-default span.cm-bracket {color: #997;}
  138. .cm-s-default span.cm-tag {color: #170;}
  139. .cm-s-default span.cm-attribute {color: #00c;}
  140. .cm-s-default span.cm-header {color: blue;}
  141. .cm-s-default span.cm-quote {color: #090;}
  142. .cm-s-default span.cm-hr {color: #999;}
  143. .cm-s-default span.cm-link {color: #00c;}
  144. span.cm-negative {color: #d44;}
  145. span.cm-positive {color: #292;}
  146. span.cm-header, span.cm-strong {font-weight: bold;}
  147. span.cm-em {font-style: italic;}
  148. span.cm-emstrong {font-style: italic; font-weight: bold;}
  149. span.cm-link {text-decoration: underline;}
  150. span.cm-invalidchar {color: #f00;}
  151. div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
  152. div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
  153. @media print {
  154. /* Hide the cursor when printing */
  155. .CodeMirror pre.CodeMirror-cursor {
  156. visibility: hidden;
  157. }
  158. }