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