codemirror.css.php 6.7 KB

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