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