codemirror.css.php 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  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. .CodeMirror {
  16. line-height: 1em;
  17. font-family: monospace;
  18. background: #fff;
  19. border: 1px solid #000;
  20. /* Necessary so the scrollbar can be absolutely positioned within the wrapper on Lion. */
  21. position: relative;
  22. /* This prevents unwanted scrollbars from showing up on the body and wrapper in IE. */
  23. overflow: hidden;
  24. }
  25. .CodeMirror-scroll {
  26. overflow: auto;
  27. height: <?php echo ceil($GLOBALS['cfg']['TextareaRows'] * 1.2); ?>em;
  28. /* This is needed to prevent an IE[67] bug where the scrolled content
  29. is visible outside of the scrolling box. */
  30. position: relative;
  31. outline: none;
  32. }
  33. /* Vertical scrollbar */
  34. .CodeMirror-scrollbar {
  35. position: absolute;
  36. right: 0; top: 0;
  37. overflow-x: hidden;
  38. overflow-y: scroll;
  39. z-index: 5;
  40. }
  41. .CodeMirror-scrollbar-inner {
  42. /* This needs to have a nonzero width in order for the scrollbar to appear
  43. in Firefox and IE9. */
  44. width: 1px;
  45. }
  46. .CodeMirror-scrollbar.cm-sb-overlap {
  47. /* Ensure that the scrollbar appears in Lion, and that it overlaps the content
  48. rather than sitting to the right of it. */
  49. position: absolute;
  50. z-index: 1;
  51. float: none;
  52. right: 0;
  53. min-width: 12px;
  54. }
  55. .CodeMirror-scrollbar.cm-sb-nonoverlap {
  56. min-width: 12px;
  57. }
  58. .CodeMirror-scrollbar.cm-sb-ie7 {
  59. min-width: 18px;
  60. }
  61. .CodeMirror-gutter {
  62. position: absolute; left: 0; top: 0;
  63. z-index: 10;
  64. background-color: #f7f7f7;
  65. border-right: 1px solid #eee;
  66. min-width: 2em;
  67. height: 100%;
  68. }
  69. .CodeMirror-gutter-text {
  70. color: #aaa;
  71. text-align: right;
  72. padding: .4em .2em .4em .4em;
  73. white-space: pre !important;
  74. cursor: default;
  75. }
  76. .CodeMirror-lines {
  77. padding: .4em;
  78. white-space: pre;
  79. cursor: text;
  80. }
  81. .CodeMirror pre {
  82. -moz-border-radius: 0;
  83. -webkit-border-radius: 0;
  84. -o-border-radius: 0;
  85. border-radius: 0;
  86. border-width: 0; margin: 0; padding: 0; background: transparent;
  87. font-family: inherit;
  88. font-size: inherit;
  89. padding: 0; margin: 0;
  90. white-space: pre;
  91. word-wrap: normal;
  92. line-height: inherit;
  93. color: inherit;
  94. overflow: visible;
  95. }
  96. .CodeMirror-wrap pre {
  97. word-wrap: break-word;
  98. white-space: pre-wrap;
  99. word-break: normal;
  100. }
  101. .CodeMirror-wrap .CodeMirror-scroll {
  102. overflow-x: hidden;
  103. }
  104. .CodeMirror textarea {
  105. outline: none !important;
  106. font-family: inherit !important;
  107. font-size: inherit !important;
  108. }
  109. .CodeMirror pre.CodeMirror-cursor {
  110. z-index: 10;
  111. position: absolute;
  112. visibility: hidden;
  113. border-<?php echo $left; ?>: 1px solid black !important;
  114. border-<?php echo $right; ?>: none;
  115. width: 0;
  116. }
  117. .cm-keymap-fat-cursor pre.CodeMirror-cursor {
  118. width: auto;
  119. border: 0;
  120. background: transparent;
  121. background: rgba(0, 200, 0, .4);
  122. filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#6600c800, endColorstr=#4c00c800);
  123. }
  124. /* Kludge to turn off filter in ie9+, which also accepts rgba */
  125. .cm-keymap-fat-cursor pre.CodeMirror-cursor:not(#nonsense_id) {
  126. filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
  127. }
  128. .CodeMirror pre.CodeMirror-cursor.CodeMirror-overwrite {}
  129. .CodeMirror-focused pre.CodeMirror-cursor {
  130. visibility: visible;
  131. }
  132. div.CodeMirror-selected { background: #d9d9d9; }
  133. .CodeMirror-focused div.CodeMirror-selected { background: #d7d4f0; }
  134. .CodeMirror-searching {
  135. background: #ffa;
  136. background: rgba(255, 255, 0, .4);
  137. }
  138. div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
  139. div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
  140. @media print {
  141. /* Hide the cursor when printing */
  142. .CodeMirror pre.CodeMirror-cursor {
  143. visibility: hidden;
  144. }
  145. }
  146. <?php echo $_SESSION['PMA_Theme']->getCssCodeMirror(); ?>