autorefresh.js
7 years ago
clike.js
7 years ago
codemirror.css
7 years ago
codemirror.js
7 years ago
htmlmixed.js
7 years ago
javascript.js
7 years ago
matchbrackets.js
7 years ago
php.js
7 years ago
xml.js
7 years ago
codemirror.css
341 lines
| 1 | /* BASICS */ |
| 2 | |
| 3 | .CodeMirror { |
| 4 | /* Set height, width, borders, and global font properties here */ |
| 5 | font-family: monospace; |
| 6 | height: 200px; |
| 7 | color: black; |
| 8 | } |
| 9 | |
| 10 | /* PADDING */ |
| 11 | |
| 12 | .CodeMirror-lines { |
| 13 | padding: 4px 0; /* Vertical padding around content */ |
| 14 | } |
| 15 | .CodeMirror pre { |
| 16 | padding: 0 4px; /* Horizontal padding of content */ |
| 17 | } |
| 18 | |
| 19 | .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { |
| 20 | background-color: white; /* The little square between H and V scrollbars */ |
| 21 | } |
| 22 | |
| 23 | /* GUTTER */ |
| 24 | |
| 25 | .CodeMirror-gutters { |
| 26 | border-right: 1px solid #ddd; |
| 27 | background-color: #f7f7f7; |
| 28 | white-space: nowrap; |
| 29 | } |
| 30 | .CodeMirror-linenumbers {} |
| 31 | .CodeMirror-linenumber { |
| 32 | padding: 0 3px 0 5px; |
| 33 | min-width: 20px; |
| 34 | text-align: right; |
| 35 | color: #999; |
| 36 | white-space: nowrap; |
| 37 | } |
| 38 | |
| 39 | .CodeMirror-guttermarker { color: black; } |
| 40 | .CodeMirror-guttermarker-subtle { color: #999; } |
| 41 | |
| 42 | /* CURSOR */ |
| 43 | |
| 44 | .CodeMirror-cursor { |
| 45 | border-left: 2px solid black; |
| 46 | border-right: none; |
| 47 | width: 0; |
| 48 | } |
| 49 | /* Shown when moving in bi-directional text */ |
| 50 | .CodeMirror div.CodeMirror-secondarycursor { |
| 51 | border-left: 1px solid silver; |
| 52 | } |
| 53 | .cm-fat-cursor .CodeMirror-cursor { |
| 54 | width: auto; |
| 55 | border: 0; |
| 56 | background: #7e7; |
| 57 | } |
| 58 | .cm-fat-cursor div.CodeMirror-cursors { |
| 59 | z-index: 1; |
| 60 | } |
| 61 | |
| 62 | .cm-animate-fat-cursor { |
| 63 | width: auto; |
| 64 | border: 0; |
| 65 | -webkit-animation: blink 1.06s steps(1) infinite; |
| 66 | -moz-animation: blink 1.06s steps(1) infinite; |
| 67 | animation: blink 1.06s steps(1) infinite; |
| 68 | background-color: #7e7; |
| 69 | } |
| 70 | @-moz-keyframes blink { |
| 71 | 0% {} |
| 72 | 50% { background-color: transparent; } |
| 73 | 100% {} |
| 74 | } |
| 75 | @-webkit-keyframes blink { |
| 76 | 0% {} |
| 77 | 50% { background-color: transparent; } |
| 78 | 100% {} |
| 79 | } |
| 80 | @keyframes blink { |
| 81 | 0% {} |
| 82 | 50% { background-color: transparent; } |
| 83 | 100% {} |
| 84 | } |
| 85 | |
| 86 | /* Can style cursor different in overwrite (non-insert) mode */ |
| 87 | .CodeMirror-overwrite .CodeMirror-cursor {} |
| 88 | |
| 89 | .cm-tab { display: inline-block; text-decoration: inherit; } |
| 90 | |
| 91 | .CodeMirror-ruler { |
| 92 | border-left: 1px solid #ccc; |
| 93 | position: absolute; |
| 94 | } |
| 95 | |
| 96 | /* DEFAULT THEME */ |
| 97 | |
| 98 | .cm-s-default .cm-header {color: blue;} |
| 99 | .cm-s-default .cm-quote {color: #090;} |
| 100 | .cm-negative {color: #d44;} |
| 101 | .cm-positive {color: #292;} |
| 102 | .cm-header, .cm-strong {font-weight: bold;} |
| 103 | .cm-em {font-style: italic;} |
| 104 | .cm-link {text-decoration: underline;} |
| 105 | .cm-strikethrough {text-decoration: line-through;} |
| 106 | |
| 107 | .cm-s-default .cm-keyword {color: #708;} |
| 108 | .cm-s-default .cm-atom {color: #000;} |
| 109 | .cm-s-default .cm-number {color: #164;} |
| 110 | .cm-s-default .cm-def {color: #00f;} |
| 111 | .cm-s-default .cm-variable, |
| 112 | .cm-s-default .cm-punctuation, |
| 113 | .cm-s-default .cm-property, |
| 114 | .cm-s-default .cm-operator {} |
| 115 | .cm-s-default .cm-variable-2 {color: #05a;} |
| 116 | .cm-s-default .cm-variable-3 {color: #085;} |
| 117 | .cm-s-default .cm-comment {color: #a50;} |
| 118 | .cm-s-default .cm-string {color: #a11;} |
| 119 | .cm-s-default .cm-string-2 {color: #f50;} |
| 120 | .cm-s-default .cm-meta {color: #555;} |
| 121 | .cm-s-default .cm-qualifier {color: #555;} |
| 122 | .cm-s-default .cm-builtin {color: #30a;} |
| 123 | .cm-s-default .cm-bracket {color: #997;} |
| 124 | .cm-s-default .cm-tag {color: #170;} |
| 125 | .cm-s-default .cm-attribute {color: #00c;} |
| 126 | .cm-s-default .cm-hr {color: #999;} |
| 127 | .cm-s-default .cm-link {color: #00c;} |
| 128 | |
| 129 | .cm-s-default .cm-error {color: #f00;} |
| 130 | .cm-invalidchar {color: #f00;} |
| 131 | |
| 132 | .CodeMirror-composing { border-bottom: 2px solid; } |
| 133 | |
| 134 | /* Default styles for common addons */ |
| 135 | |
| 136 | div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;} |
| 137 | div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;} |
| 138 | .CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); } |
| 139 | .CodeMirror-activeline-background {background: #e8f2ff;} |
| 140 | |
| 141 | /* STOP */ |
| 142 | |
| 143 | /* The rest of this file contains styles related to the mechanics of |
| 144 | the editor. You probably shouldn't touch them. */ |
| 145 | |
| 146 | .CodeMirror { |
| 147 | position: relative; |
| 148 | overflow: hidden; |
| 149 | background: white; |
| 150 | } |
| 151 | |
| 152 | .CodeMirror-scroll { |
| 153 | overflow: scroll !important; /* Things will break if this is overridden */ |
| 154 | /* 30px is the magic margin used to hide the element's real scrollbars */ |
| 155 | /* See overflow: hidden in .CodeMirror */ |
| 156 | margin-bottom: -30px; margin-right: -30px; |
| 157 | padding-bottom: 30px; |
| 158 | height: 100%; |
| 159 | outline: none; /* Prevent dragging from highlighting the element */ |
| 160 | position: relative; |
| 161 | } |
| 162 | .CodeMirror-sizer { |
| 163 | position: relative; |
| 164 | margin-left: 30px !important; |
| 165 | min-height: 120px !important; |
| 166 | border-right: 30px solid transparent; |
| 167 | } |
| 168 | |
| 169 | /* The fake, visible scrollbars. Used to force redraw during scrolling |
| 170 | before actuall scrolling happens, thus preventing shaking and |
| 171 | flickering artifacts. */ |
| 172 | .CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { |
| 173 | position: absolute; |
| 174 | z-index: 6; |
| 175 | display: none; |
| 176 | } |
| 177 | .CodeMirror-vscrollbar { |
| 178 | right: 0; top: 0; |
| 179 | overflow-x: hidden; |
| 180 | overflow-y: scroll; |
| 181 | } |
| 182 | .CodeMirror-hscrollbar { |
| 183 | bottom: 0; left: 0; |
| 184 | overflow-y: hidden; |
| 185 | overflow-x: scroll; |
| 186 | } |
| 187 | .CodeMirror-scrollbar-filler { |
| 188 | right: 0; bottom: 0; |
| 189 | } |
| 190 | .CodeMirror-gutter-filler { |
| 191 | left: 0; bottom: 0; |
| 192 | } |
| 193 | |
| 194 | .CodeMirror-gutters { |
| 195 | position: absolute; left: 0; top: 0; |
| 196 | z-index: 3; |
| 197 | } |
| 198 | .CodeMirror-gutter { |
| 199 | white-space: normal; |
| 200 | height: 100%; |
| 201 | display: inline-block; |
| 202 | margin-bottom: -30px; |
| 203 | width: 29px !important; |
| 204 | /* Hack to make IE7 behave */ |
| 205 | *zoom:1; |
| 206 | *display:inline; |
| 207 | } |
| 208 | .CodeMirror-gutter-wrapper { |
| 209 | position: absolute; |
| 210 | z-index: 4; |
| 211 | background: none !important; |
| 212 | border: none !important; |
| 213 | } |
| 214 | .CodeMirror-gutter-background { |
| 215 | position: absolute; |
| 216 | top: 0; bottom: 0; |
| 217 | z-index: 4; |
| 218 | } |
| 219 | .CodeMirror-gutter-elt { |
| 220 | position: absolute; |
| 221 | cursor: default; |
| 222 | z-index: 4; |
| 223 | } |
| 224 | .CodeMirror-gutter-wrapper { |
| 225 | -webkit-user-select: none; |
| 226 | -moz-user-select: none; |
| 227 | user-select: none; |
| 228 | } |
| 229 | |
| 230 | .CodeMirror-lines { |
| 231 | cursor: text; |
| 232 | min-height: 1px; /* prevents collapsing before first draw */ |
| 233 | } |
| 234 | .CodeMirror pre { |
| 235 | /* Reset some styles that the rest of the page might have set */ |
| 236 | -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; |
| 237 | border-width: 0; |
| 238 | background: transparent; |
| 239 | font-family: inherit; |
| 240 | font-size: inherit; |
| 241 | margin: 0; |
| 242 | white-space: pre; |
| 243 | word-wrap: normal; |
| 244 | line-height: inherit; |
| 245 | color: inherit; |
| 246 | z-index: 2; |
| 247 | position: relative; |
| 248 | overflow: visible; |
| 249 | -webkit-tap-highlight-color: transparent; |
| 250 | } |
| 251 | .CodeMirror-wrap pre { |
| 252 | word-wrap: break-word; |
| 253 | white-space: pre-wrap; |
| 254 | word-break: normal; |
| 255 | } |
| 256 | |
| 257 | .CodeMirror-linebackground { |
| 258 | position: absolute; |
| 259 | left: 0; right: 0; top: 0; bottom: 0; |
| 260 | z-index: 0; |
| 261 | } |
| 262 | |
| 263 | .CodeMirror-linewidget { |
| 264 | position: relative; |
| 265 | z-index: 2; |
| 266 | overflow: auto; |
| 267 | } |
| 268 | |
| 269 | .CodeMirror-widget {} |
| 270 | |
| 271 | .CodeMirror-code { |
| 272 | outline: none; |
| 273 | } |
| 274 | |
| 275 | /* Force content-box sizing for the elements where we expect it */ |
| 276 | .CodeMirror-scroll, |
| 277 | .CodeMirror-sizer, |
| 278 | .CodeMirror-gutter, |
| 279 | .CodeMirror-gutters, |
| 280 | .CodeMirror-linenumber { |
| 281 | -moz-box-sizing: content-box; |
| 282 | box-sizing: content-box; |
| 283 | } |
| 284 | |
| 285 | .CodeMirror-measure { |
| 286 | position: absolute; |
| 287 | width: 100%; |
| 288 | height: 0; |
| 289 | overflow: hidden; |
| 290 | visibility: hidden; |
| 291 | } |
| 292 | |
| 293 | .CodeMirror-cursor { position: absolute; } |
| 294 | .CodeMirror-measure pre { position: static; } |
| 295 | |
| 296 | div.CodeMirror-cursors { |
| 297 | visibility: hidden; |
| 298 | position: relative; |
| 299 | z-index: 3; |
| 300 | } |
| 301 | div.CodeMirror-dragcursors { |
| 302 | visibility: visible; |
| 303 | } |
| 304 | |
| 305 | .CodeMirror-focused div.CodeMirror-cursors { |
| 306 | visibility: visible; |
| 307 | } |
| 308 | |
| 309 | .CodeMirror-selected { background: #d9d9d9; } |
| 310 | .CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; } |
| 311 | .CodeMirror-crosshair { cursor: crosshair; } |
| 312 | .CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; } |
| 313 | .CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; } |
| 314 | |
| 315 | .cm-searching { |
| 316 | background: #ffa; |
| 317 | background: rgba(255, 255, 0, .4); |
| 318 | } |
| 319 | |
| 320 | /* IE7 hack to prevent it from returning funny offsetTops on the spans */ |
| 321 | .CodeMirror span { *vertical-align: text-bottom; font-weight: bold;} |
| 322 | .CodeMirror span span { font-weight: normal; } |
| 323 | .CodeMirror span span.cm-string, .CodeMirror span span.cm-atom{ |
| 324 | font-weight: bold; |
| 325 | } |
| 326 | /* Used to force a border model for a node */ |
| 327 | .cm-force-border { padding-right: .1px; } |
| 328 | |
| 329 | @media print { |
| 330 | /* Hide the cursor when printing */ |
| 331 | .CodeMirror div.CodeMirror-cursors { |
| 332 | visibility: hidden; |
| 333 | } |
| 334 | } |
| 335 | |
| 336 | /* See issue #2901 */ |
| 337 | .cm-tab-wrap-hack:after { content: ''; } |
| 338 | |
| 339 | /* Help users use markselection to safely style text background */ |
| 340 | span.CodeMirror-selectedtext { background: none; } |
| 341 |