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