phrebejk@460
|
1 |
/* BASICS */
|
phrebejk@460
|
2 |
|
phrebejk@460
|
3 |
.CodeMirror {
|
phrebejk@460
|
4 |
/* Set height, width, borders, and global font properties here */
|
phrebejk@460
|
5 |
font-family: monospace;
|
phrebejk@460
|
6 |
height: 300px;
|
phrebejk@460
|
7 |
}
|
phrebejk@460
|
8 |
.CodeMirror-scroll {
|
phrebejk@460
|
9 |
/* Set scrolling behaviour here */
|
phrebejk@460
|
10 |
overflow: auto;
|
phrebejk@460
|
11 |
}
|
phrebejk@460
|
12 |
|
phrebejk@460
|
13 |
/* PADDING */
|
phrebejk@460
|
14 |
|
phrebejk@460
|
15 |
.CodeMirror-lines {
|
phrebejk@460
|
16 |
padding: 4px 0; /* Vertical padding around content */
|
phrebejk@460
|
17 |
}
|
phrebejk@460
|
18 |
.CodeMirror pre {
|
phrebejk@460
|
19 |
padding: 0 4px; /* Horizontal padding of content */
|
phrebejk@460
|
20 |
}
|
phrebejk@460
|
21 |
|
phrebejk@460
|
22 |
.CodeMirror-scrollbar-filler {
|
phrebejk@460
|
23 |
background-color: white; /* The little square between H and V scrollbars */
|
phrebejk@460
|
24 |
}
|
phrebejk@460
|
25 |
|
phrebejk@460
|
26 |
/* GUTTER */
|
phrebejk@460
|
27 |
|
phrebejk@460
|
28 |
.CodeMirror-gutters {
|
phrebejk@460
|
29 |
border-right: 1px solid #ddd;
|
phrebejk@460
|
30 |
background-color: #f7f7f7;
|
phrebejk@460
|
31 |
}
|
phrebejk@460
|
32 |
.CodeMirror-linenumbers {}
|
phrebejk@460
|
33 |
.CodeMirror-linenumber {
|
phrebejk@460
|
34 |
padding: 0 3px 0 5px;
|
phrebejk@460
|
35 |
min-width: 20px;
|
phrebejk@460
|
36 |
text-align: right;
|
phrebejk@460
|
37 |
color: #999;
|
phrebejk@460
|
38 |
}
|
phrebejk@460
|
39 |
|
phrebejk@460
|
40 |
/* CURSOR */
|
phrebejk@460
|
41 |
|
phrebejk@460
|
42 |
.CodeMirror pre.CodeMirror-cursor {
|
phrebejk@460
|
43 |
border-left: 1px solid black;
|
phrebejk@460
|
44 |
}
|
phrebejk@460
|
45 |
/* Shown when moving in bi-directional text */
|
phrebejk@460
|
46 |
.CodeMirror pre.CodeMirror-secondarycursor {
|
phrebejk@460
|
47 |
border-left: 1px solid silver;
|
phrebejk@460
|
48 |
}
|
phrebejk@460
|
49 |
.cm-keymap-fat-cursor pre.CodeMirror-cursor {
|
phrebejk@460
|
50 |
width: auto;
|
phrebejk@460
|
51 |
border: 0;
|
phrebejk@460
|
52 |
background: transparent;
|
phrebejk@460
|
53 |
background: rgba(0, 200, 0, .4);
|
phrebejk@460
|
54 |
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#6600c800, endColorstr=#4c00c800);
|
phrebejk@460
|
55 |
}
|
phrebejk@460
|
56 |
/* Kludge to turn off filter in ie9+, which also accepts rgba */
|
phrebejk@460
|
57 |
.cm-keymap-fat-cursor pre.CodeMirror-cursor:not(#nonsense_id) {
|
phrebejk@460
|
58 |
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
phrebejk@460
|
59 |
}
|
phrebejk@460
|
60 |
/* Can style cursor different in overwrite (non-insert) mode */
|
phrebejk@460
|
61 |
.CodeMirror pre.CodeMirror-cursor.CodeMirror-overwrite {}
|
phrebejk@460
|
62 |
|
phrebejk@460
|
63 |
/* DEFAULT THEME */
|
phrebejk@460
|
64 |
|
phrebejk@460
|
65 |
.cm-s-default .cm-keyword {color: #708;}
|
phrebejk@460
|
66 |
.cm-s-default .cm-atom {color: #219;}
|
phrebejk@460
|
67 |
.cm-s-default .cm-number {color: #164;}
|
phrebejk@460
|
68 |
.cm-s-default .cm-def {color: #00f;}
|
phrebejk@460
|
69 |
.cm-s-default .cm-variable {color: black;}
|
phrebejk@460
|
70 |
.cm-s-default .cm-variable-2 {color: #05a;}
|
phrebejk@460
|
71 |
.cm-s-default .cm-variable-3 {color: #085;}
|
phrebejk@460
|
72 |
.cm-s-default .cm-property {color: black;}
|
phrebejk@460
|
73 |
.cm-s-default .cm-operator {color: black;}
|
phrebejk@460
|
74 |
.cm-s-default .cm-comment {color: #a50;}
|
phrebejk@460
|
75 |
.cm-s-default .cm-string {color: #a11;}
|
phrebejk@460
|
76 |
.cm-s-default .cm-string-2 {color: #f50;}
|
phrebejk@460
|
77 |
.cm-s-default .cm-meta {color: #555;}
|
phrebejk@460
|
78 |
.cm-s-default .cm-error {color: #f00;}
|
phrebejk@460
|
79 |
.cm-s-default .cm-qualifier {color: #555;}
|
phrebejk@460
|
80 |
.cm-s-default .cm-builtin {color: #30a;}
|
phrebejk@460
|
81 |
.cm-s-default .cm-bracket {color: #997;}
|
phrebejk@460
|
82 |
.cm-s-default .cm-tag {color: #170;}
|
phrebejk@460
|
83 |
.cm-s-default .cm-attribute {color: #00c;}
|
phrebejk@460
|
84 |
.cm-s-default .cm-header {color: blue;}
|
phrebejk@460
|
85 |
.cm-s-default .cm-quote {color: #090;}
|
phrebejk@460
|
86 |
.cm-s-default .cm-hr {color: #999;}
|
phrebejk@460
|
87 |
.cm-s-default .cm-link {color: #00c;}
|
phrebejk@460
|
88 |
|
phrebejk@460
|
89 |
.cm-negative {color: #d44;}
|
phrebejk@460
|
90 |
.cm-positive {color: #292;}
|
phrebejk@460
|
91 |
.cm-header, .cm-strong {font-weight: bold;}
|
phrebejk@460
|
92 |
.cm-em {font-style: italic;}
|
phrebejk@460
|
93 |
.cm-emstrong {font-style: italic; font-weight: bold;}
|
phrebejk@460
|
94 |
.cm-link {text-decoration: underline;}
|
phrebejk@460
|
95 |
|
phrebejk@460
|
96 |
.cm-invalidchar {color: #f00;}
|
phrebejk@460
|
97 |
|
phrebejk@460
|
98 |
div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
|
phrebejk@460
|
99 |
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
|
phrebejk@460
|
100 |
|
phrebejk@460
|
101 |
/* STOP */
|
phrebejk@460
|
102 |
|
phrebejk@460
|
103 |
/* The rest of this file contains styles related to the mechanics of
|
phrebejk@460
|
104 |
the editor. You probably shouldn't touch them. */
|
phrebejk@460
|
105 |
|
phrebejk@460
|
106 |
.CodeMirror {
|
phrebejk@460
|
107 |
line-height: 1;
|
phrebejk@460
|
108 |
position: relative;
|
phrebejk@460
|
109 |
overflow: hidden;
|
phrebejk@460
|
110 |
}
|
phrebejk@460
|
111 |
|
phrebejk@460
|
112 |
.CodeMirror-scroll {
|
phrebejk@460
|
113 |
/* 30px is the magic margin used to hide the element's real scrollbars */
|
phrebejk@460
|
114 |
/* See overflow: hidden in .CodeMirror, and the paddings in .CodeMirror-sizer */
|
phrebejk@460
|
115 |
margin-bottom: -30px; margin-right: -30px;
|
phrebejk@460
|
116 |
padding-bottom: 30px; padding-right: 30px;
|
phrebejk@460
|
117 |
height: 100%;
|
phrebejk@460
|
118 |
outline: none; /* Prevent dragging from highlighting the element */
|
phrebejk@460
|
119 |
position: relative;
|
phrebejk@460
|
120 |
}
|
phrebejk@460
|
121 |
.CodeMirror-sizer {
|
phrebejk@460
|
122 |
position: relative;
|
phrebejk@460
|
123 |
}
|
phrebejk@460
|
124 |
|
phrebejk@460
|
125 |
/* The fake, visible scrollbars. Used to force redraw during scrolling
|
phrebejk@460
|
126 |
before actuall scrolling happens, thus preventing shaking and
|
phrebejk@460
|
127 |
flickering artifacts. */
|
phrebejk@460
|
128 |
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler {
|
phrebejk@460
|
129 |
position: absolute;
|
phrebejk@460
|
130 |
z-index: 6;
|
phrebejk@460
|
131 |
display: none;
|
phrebejk@460
|
132 |
}
|
phrebejk@460
|
133 |
.CodeMirror-vscrollbar {
|
phrebejk@460
|
134 |
right: 0; top: 0;
|
phrebejk@460
|
135 |
overflow-x: hidden;
|
phrebejk@460
|
136 |
overflow-y: scroll;
|
phrebejk@460
|
137 |
}
|
phrebejk@460
|
138 |
.CodeMirror-hscrollbar {
|
phrebejk@460
|
139 |
bottom: 0; left: 0;
|
phrebejk@460
|
140 |
overflow-y: hidden;
|
phrebejk@460
|
141 |
overflow-x: scroll;
|
phrebejk@460
|
142 |
}
|
phrebejk@460
|
143 |
.CodeMirror-scrollbar-filler {
|
phrebejk@460
|
144 |
right: 0; bottom: 0;
|
phrebejk@460
|
145 |
z-index: 6;
|
phrebejk@460
|
146 |
}
|
phrebejk@460
|
147 |
|
phrebejk@460
|
148 |
.CodeMirror-gutters {
|
phrebejk@460
|
149 |
position: absolute; left: 0; top: 0;
|
phrebejk@460
|
150 |
height: 100%;
|
phrebejk@460
|
151 |
z-index: 3;
|
phrebejk@460
|
152 |
}
|
phrebejk@460
|
153 |
.CodeMirror-gutter {
|
phrebejk@460
|
154 |
height: 100%;
|
phrebejk@460
|
155 |
display: inline-block;
|
phrebejk@460
|
156 |
/* Hack to make IE7 behave */
|
phrebejk@460
|
157 |
*zoom:1;
|
phrebejk@460
|
158 |
*display:inline;
|
phrebejk@460
|
159 |
}
|
phrebejk@460
|
160 |
.CodeMirror-gutter-elt {
|
phrebejk@460
|
161 |
position: absolute;
|
phrebejk@460
|
162 |
cursor: default;
|
phrebejk@460
|
163 |
z-index: 4;
|
phrebejk@460
|
164 |
}
|
phrebejk@460
|
165 |
|
phrebejk@460
|
166 |
.CodeMirror-lines {
|
phrebejk@460
|
167 |
cursor: text;
|
phrebejk@460
|
168 |
}
|
phrebejk@460
|
169 |
.CodeMirror pre {
|
phrebejk@460
|
170 |
/* Reset some styles that the rest of the page might have set */
|
phrebejk@460
|
171 |
-moz-border-radius: 0; -webkit-border-radius: 0; -o-border-radius: 0; border-radius: 0;
|
phrebejk@460
|
172 |
border-width: 0;
|
phrebejk@460
|
173 |
background: transparent;
|
phrebejk@460
|
174 |
font-family: inherit;
|
phrebejk@460
|
175 |
font-size: inherit;
|
phrebejk@460
|
176 |
margin: 0;
|
phrebejk@460
|
177 |
white-space: pre;
|
phrebejk@460
|
178 |
word-wrap: normal;
|
phrebejk@460
|
179 |
line-height: inherit;
|
phrebejk@460
|
180 |
color: inherit;
|
phrebejk@460
|
181 |
z-index: 2;
|
phrebejk@460
|
182 |
position: relative;
|
phrebejk@460
|
183 |
overflow: visible;
|
phrebejk@460
|
184 |
}
|
phrebejk@460
|
185 |
.CodeMirror-wrap pre {
|
phrebejk@460
|
186 |
word-wrap: break-word;
|
phrebejk@460
|
187 |
white-space: pre-wrap;
|
phrebejk@460
|
188 |
word-break: normal;
|
phrebejk@460
|
189 |
}
|
phrebejk@460
|
190 |
.CodeMirror-linebackground {
|
phrebejk@460
|
191 |
position: absolute;
|
phrebejk@460
|
192 |
left: 0; right: 0; top: 0; bottom: 0;
|
phrebejk@460
|
193 |
z-index: 0;
|
phrebejk@460
|
194 |
}
|
phrebejk@460
|
195 |
|
phrebejk@460
|
196 |
.CodeMirror-linewidget {
|
phrebejk@460
|
197 |
position: relative;
|
phrebejk@460
|
198 |
z-index: 2;
|
phrebejk@460
|
199 |
}
|
phrebejk@460
|
200 |
|
phrebejk@460
|
201 |
.CodeMirror-wrap .CodeMirror-scroll {
|
phrebejk@460
|
202 |
overflow-x: hidden;
|
phrebejk@460
|
203 |
}
|
phrebejk@460
|
204 |
|
phrebejk@460
|
205 |
.CodeMirror-measure {
|
phrebejk@460
|
206 |
position: absolute;
|
phrebejk@460
|
207 |
width: 100%; height: 0px;
|
phrebejk@460
|
208 |
overflow: hidden;
|
phrebejk@460
|
209 |
visibility: hidden;
|
phrebejk@460
|
210 |
}
|
phrebejk@460
|
211 |
.CodeMirror-measure pre { position: static; }
|
phrebejk@460
|
212 |
|
phrebejk@460
|
213 |
.CodeMirror pre.CodeMirror-cursor {
|
phrebejk@460
|
214 |
position: absolute;
|
phrebejk@460
|
215 |
visibility: hidden;
|
phrebejk@460
|
216 |
border-right: none;
|
phrebejk@460
|
217 |
width: 0;
|
phrebejk@460
|
218 |
}
|
phrebejk@460
|
219 |
.CodeMirror-focused pre.CodeMirror-cursor {
|
phrebejk@460
|
220 |
visibility: visible;
|
phrebejk@460
|
221 |
}
|
phrebejk@460
|
222 |
|
phrebejk@460
|
223 |
.CodeMirror-selected { background: #d9d9d9; }
|
phrebejk@460
|
224 |
.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
|
phrebejk@460
|
225 |
|
phrebejk@460
|
226 |
.CodeMirror-searching {
|
phrebejk@460
|
227 |
background: #ffa;
|
phrebejk@460
|
228 |
background: rgba(255, 255, 0, .4);
|
phrebejk@460
|
229 |
}
|
phrebejk@460
|
230 |
|
phrebejk@460
|
231 |
/* IE7 hack to prevent it from returning funny offsetTops on the spans */
|
phrebejk@460
|
232 |
.CodeMirror span { *vertical-align: text-bottom; }
|
phrebejk@460
|
233 |
|
phrebejk@460
|
234 |
@media print {
|
phrebejk@460
|
235 |
/* Hide the cursor when printing */
|
phrebejk@460
|
236 |
.CodeMirror pre.CodeMirror-cursor {
|
phrebejk@460
|
237 |
visibility: hidden;
|
phrebejk@460
|
238 |
}
|
phrebejk@460
|
239 |
}
|