kit_cms 2.3.8 → 2.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. data/app/assets/javascripts/codemirror/codemirror.js +5104 -0
  2. data/app/assets/javascripts/codemirror/collapserange.js +68 -0
  3. data/app/assets/javascripts/codemirror/css.js +465 -0
  4. data/app/assets/javascripts/codemirror/dialog.js +76 -0
  5. data/app/assets/javascripts/codemirror/editor.js +19 -0
  6. data/app/assets/javascripts/codemirror/foldcode.js +183 -0
  7. data/app/assets/javascripts/codemirror/formatting.js +108 -0
  8. data/app/assets/javascripts/codemirror/htmlmixed.js +84 -0
  9. data/app/assets/javascripts/codemirror/javascript.js +422 -0
  10. data/app/assets/javascripts/codemirror/jquery.js +4 -0
  11. data/app/assets/javascripts/codemirror/loadmode.js +51 -0
  12. data/app/assets/javascripts/codemirror/match-highlighter.js +46 -0
  13. data/app/assets/javascripts/codemirror/matchbrackets.js +63 -0
  14. data/app/assets/javascripts/codemirror/multiplex.js +95 -0
  15. data/app/assets/javascripts/codemirror/overlay.js +59 -0
  16. data/app/assets/javascripts/codemirror/search.js +131 -0
  17. data/app/assets/javascripts/codemirror/searchcursor.js +131 -0
  18. data/app/assets/javascripts/codemirror/xml.js +324 -0
  19. data/app/assets/stylesheets/codemirror/dialog.css +32 -0
  20. data/app/assets/stylesheets/codemirror/style.css +242 -0
  21. data/app/assets/stylesheets/codemirror/theme.css +25 -0
  22. data/app/views/layouts/_html-editor.html.haml +1 -0
  23. data/app/views/layouts/mercury-editor.html.erb +5 -5
  24. data/app/views/utility/mercury_html.html.haml +28 -3
  25. metadata +41 -39
  26. data/app/assets/javascripts/kit/markitup/jquery.markitup.js +0 -634
  27. data/app/assets/javascripts/kit/markitup/settings.js +0 -31
  28. data/app/assets/stylesheets/kit/markitup/html.css +0 -59
  29. data/app/assets/stylesheets/kit/markitup/images/bg-container.png +0 -0
  30. data/app/assets/stylesheets/kit/markitup/images/bg-editor-bbcode.png +0 -0
  31. data/app/assets/stylesheets/kit/markitup/images/bg-editor-dotclear.png +0 -0
  32. data/app/assets/stylesheets/kit/markitup/images/bg-editor-html.png +0 -0
  33. data/app/assets/stylesheets/kit/markitup/images/bg-editor-json.png +0 -0
  34. data/app/assets/stylesheets/kit/markitup/images/bg-editor-markdown.png +0 -0
  35. data/app/assets/stylesheets/kit/markitup/images/bg-editor-textile.png +0 -0
  36. data/app/assets/stylesheets/kit/markitup/images/bg-editor-wiki.png +0 -0
  37. data/app/assets/stylesheets/kit/markitup/images/bg-editor-xml.png +0 -0
  38. data/app/assets/stylesheets/kit/markitup/images/bg-editor.png +0 -0
  39. data/app/assets/stylesheets/kit/markitup/images/bold.png +0 -0
  40. data/app/assets/stylesheets/kit/markitup/images/clean.png +0 -0
  41. data/app/assets/stylesheets/kit/markitup/images/h1.png +0 -0
  42. data/app/assets/stylesheets/kit/markitup/images/h2.png +0 -0
  43. data/app/assets/stylesheets/kit/markitup/images/h3.png +0 -0
  44. data/app/assets/stylesheets/kit/markitup/images/h4.png +0 -0
  45. data/app/assets/stylesheets/kit/markitup/images/h5.png +0 -0
  46. data/app/assets/stylesheets/kit/markitup/images/h6.png +0 -0
  47. data/app/assets/stylesheets/kit/markitup/images/handle.png +0 -0
  48. data/app/assets/stylesheets/kit/markitup/images/image.png +0 -0
  49. data/app/assets/stylesheets/kit/markitup/images/italic.png +0 -0
  50. data/app/assets/stylesheets/kit/markitup/images/link.png +0 -0
  51. data/app/assets/stylesheets/kit/markitup/images/list-bullet.png +0 -0
  52. data/app/assets/stylesheets/kit/markitup/images/list-item.png +0 -0
  53. data/app/assets/stylesheets/kit/markitup/images/list-numeric.png +0 -0
  54. data/app/assets/stylesheets/kit/markitup/images/menu.png +0 -0
  55. data/app/assets/stylesheets/kit/markitup/images/paragraph.png +0 -0
  56. data/app/assets/stylesheets/kit/markitup/images/picture.png +0 -0
  57. data/app/assets/stylesheets/kit/markitup/images/preview.png +0 -0
  58. data/app/assets/stylesheets/kit/markitup/images/stroke.png +0 -0
  59. data/app/assets/stylesheets/kit/markitup/images/submenu.png +0 -0
  60. data/app/assets/stylesheets/kit/markitup/style.css +0 -145
  61. data/lib/kit_cms/version.rb +0 -3
@@ -0,0 +1,324 @@
1
+ CodeMirror.defineMode("xml", function(config, parserConfig) {
2
+ var indentUnit = config.indentUnit;
3
+ var Kludges = parserConfig.htmlMode ? {
4
+ autoSelfClosers: {'area': true, 'base': true, 'br': true, 'col': true, 'command': true,
5
+ 'embed': true, 'frame': true, 'hr': true, 'img': true, 'input': true,
6
+ 'keygen': true, 'link': true, 'meta': true, 'param': true, 'source': true,
7
+ 'track': true, 'wbr': true},
8
+ implicitlyClosed: {'dd': true, 'li': true, 'optgroup': true, 'option': true, 'p': true,
9
+ 'rp': true, 'rt': true, 'tbody': true, 'td': true, 'tfoot': true,
10
+ 'th': true, 'tr': true},
11
+ contextGrabbers: {
12
+ 'dd': {'dd': true, 'dt': true},
13
+ 'dt': {'dd': true, 'dt': true},
14
+ 'li': {'li': true},
15
+ 'option': {'option': true, 'optgroup': true},
16
+ 'optgroup': {'optgroup': true},
17
+ 'p': {'address': true, 'article': true, 'aside': true, 'blockquote': true, 'dir': true,
18
+ 'div': true, 'dl': true, 'fieldset': true, 'footer': true, 'form': true,
19
+ 'h1': true, 'h2': true, 'h3': true, 'h4': true, 'h5': true, 'h6': true,
20
+ 'header': true, 'hgroup': true, 'hr': true, 'menu': true, 'nav': true, 'ol': true,
21
+ 'p': true, 'pre': true, 'section': true, 'table': true, 'ul': true},
22
+ 'rp': {'rp': true, 'rt': true},
23
+ 'rt': {'rp': true, 'rt': true},
24
+ 'tbody': {'tbody': true, 'tfoot': true},
25
+ 'td': {'td': true, 'th': true},
26
+ 'tfoot': {'tbody': true},
27
+ 'th': {'td': true, 'th': true},
28
+ 'thead': {'tbody': true, 'tfoot': true},
29
+ 'tr': {'tr': true}
30
+ },
31
+ doNotIndent: {"pre": true},
32
+ allowUnquoted: true,
33
+ allowMissing: true
34
+ } : {
35
+ autoSelfClosers: {},
36
+ implicitlyClosed: {},
37
+ contextGrabbers: {},
38
+ doNotIndent: {},
39
+ allowUnquoted: false,
40
+ allowMissing: false
41
+ };
42
+ var alignCDATA = parserConfig.alignCDATA;
43
+
44
+ // Return variables for tokenizers
45
+ var tagName, type;
46
+
47
+ function inText(stream, state) {
48
+ function chain(parser) {
49
+ state.tokenize = parser;
50
+ return parser(stream, state);
51
+ }
52
+
53
+ var ch = stream.next();
54
+ if (ch == "<") {
55
+ if (stream.eat("!")) {
56
+ if (stream.eat("[")) {
57
+ if (stream.match("CDATA[")) return chain(inBlock("atom", "]]>"));
58
+ else return null;
59
+ }
60
+ else if (stream.match("--")) return chain(inBlock("comment", "-->"));
61
+ else if (stream.match("DOCTYPE", true, true)) {
62
+ stream.eatWhile(/[\w\._\-]/);
63
+ return chain(doctype(1));
64
+ }
65
+ else return null;
66
+ }
67
+ else if (stream.eat("?")) {
68
+ stream.eatWhile(/[\w\._\-]/);
69
+ state.tokenize = inBlock("meta", "?>");
70
+ return "meta";
71
+ }
72
+ else {
73
+ var isClose = stream.eat("/");
74
+ tagName = "";
75
+ var c;
76
+ while ((c = stream.eat(/[^\s\u00a0=<>\"\'\/?]/))) tagName += c;
77
+ if (!tagName) return "error";
78
+ type = isClose ? "closeTag" : "openTag";
79
+ state.tokenize = inTag;
80
+ return "tag";
81
+ }
82
+ }
83
+ else if (ch == "&") {
84
+ var ok;
85
+ if (stream.eat("#")) {
86
+ if (stream.eat("x")) {
87
+ ok = stream.eatWhile(/[a-fA-F\d]/) && stream.eat(";");
88
+ } else {
89
+ ok = stream.eatWhile(/[\d]/) && stream.eat(";");
90
+ }
91
+ } else {
92
+ ok = stream.eatWhile(/[\w\.\-:]/) && stream.eat(";");
93
+ }
94
+ return ok ? "atom" : "error";
95
+ }
96
+ else {
97
+ stream.eatWhile(/[^&<]/);
98
+ return null;
99
+ }
100
+ }
101
+
102
+ function inTag(stream, state) {
103
+ var ch = stream.next();
104
+ if (ch == ">" || (ch == "/" && stream.eat(">"))) {
105
+ state.tokenize = inText;
106
+ type = ch == ">" ? "endTag" : "selfcloseTag";
107
+ return "tag";
108
+ }
109
+ else if (ch == "=") {
110
+ type = "equals";
111
+ return null;
112
+ }
113
+ else if (/[\'\"]/.test(ch)) {
114
+ state.tokenize = inAttribute(ch);
115
+ return state.tokenize(stream, state);
116
+ }
117
+ else {
118
+ stream.eatWhile(/[^\s\u00a0=<>\"\']/);
119
+ return "word";
120
+ }
121
+ }
122
+
123
+ function inAttribute(quote) {
124
+ return function(stream, state) {
125
+ while (!stream.eol()) {
126
+ if (stream.next() == quote) {
127
+ state.tokenize = inTag;
128
+ break;
129
+ }
130
+ }
131
+ return "string";
132
+ };
133
+ }
134
+
135
+ function inBlock(style, terminator) {
136
+ return function(stream, state) {
137
+ while (!stream.eol()) {
138
+ if (stream.match(terminator)) {
139
+ state.tokenize = inText;
140
+ break;
141
+ }
142
+ stream.next();
143
+ }
144
+ return style;
145
+ };
146
+ }
147
+ function doctype(depth) {
148
+ return function(stream, state) {
149
+ var ch;
150
+ while ((ch = stream.next()) != null) {
151
+ if (ch == "<") {
152
+ state.tokenize = doctype(depth + 1);
153
+ return state.tokenize(stream, state);
154
+ } else if (ch == ">") {
155
+ if (depth == 1) {
156
+ state.tokenize = inText;
157
+ break;
158
+ } else {
159
+ state.tokenize = doctype(depth - 1);
160
+ return state.tokenize(stream, state);
161
+ }
162
+ }
163
+ }
164
+ return "meta";
165
+ };
166
+ }
167
+
168
+ var curState, setStyle;
169
+ function pass() {
170
+ for (var i = arguments.length - 1; i >= 0; i--) curState.cc.push(arguments[i]);
171
+ }
172
+ function cont() {
173
+ pass.apply(null, arguments);
174
+ return true;
175
+ }
176
+
177
+ function pushContext(tagName, startOfLine) {
178
+ var noIndent = Kludges.doNotIndent.hasOwnProperty(tagName) || (curState.context && curState.context.noIndent);
179
+ curState.context = {
180
+ prev: curState.context,
181
+ tagName: tagName,
182
+ indent: curState.indented,
183
+ startOfLine: startOfLine,
184
+ noIndent: noIndent
185
+ };
186
+ }
187
+ function popContext() {
188
+ if (curState.context) curState.context = curState.context.prev;
189
+ }
190
+
191
+ function element(type) {
192
+ if (type == "openTag") {
193
+ curState.tagName = tagName;
194
+ return cont(attributes, endtag(curState.startOfLine));
195
+ } else if (type == "closeTag") {
196
+ var err = false;
197
+ if (curState.context) {
198
+ if (curState.context.tagName != tagName) {
199
+ if (Kludges.implicitlyClosed.hasOwnProperty(curState.context.tagName.toLowerCase())) {
200
+ popContext();
201
+ }
202
+ err = !curState.context || curState.context.tagName != tagName;
203
+ }
204
+ } else {
205
+ err = true;
206
+ }
207
+ if (err) setStyle = "error";
208
+ return cont(endclosetag(err));
209
+ }
210
+ return cont();
211
+ }
212
+ function endtag(startOfLine) {
213
+ return function(type) {
214
+ var tagName = curState.tagName;
215
+ curState.tagName = null;
216
+ if (type == "selfcloseTag" ||
217
+ (type == "endTag" && Kludges.autoSelfClosers.hasOwnProperty(tagName.toLowerCase()))) {
218
+ maybePopContext(tagName.toLowerCase());
219
+ return cont();
220
+ }
221
+ if (type == "endTag") {
222
+ maybePopContext(tagName.toLowerCase());
223
+ pushContext(tagName, startOfLine);
224
+ return cont();
225
+ }
226
+ return cont();
227
+ };
228
+ }
229
+ function endclosetag(err) {
230
+ return function(type) {
231
+ if (err) setStyle = "error";
232
+ if (type == "endTag") { popContext(); return cont(); }
233
+ setStyle = "error";
234
+ return cont(arguments.callee);
235
+ };
236
+ }
237
+ function maybePopContext(nextTagName) {
238
+ var parentTagName;
239
+ while (true) {
240
+ if (!curState.context) {
241
+ return;
242
+ }
243
+ parentTagName = curState.context.tagName.toLowerCase();
244
+ if (!Kludges.contextGrabbers.hasOwnProperty(parentTagName) ||
245
+ !Kludges.contextGrabbers[parentTagName].hasOwnProperty(nextTagName)) {
246
+ return;
247
+ }
248
+ popContext();
249
+ }
250
+ }
251
+
252
+ function attributes(type) {
253
+ if (type == "word") {setStyle = "attribute"; return cont(attribute, attributes);}
254
+ if (type == "endTag" || type == "selfcloseTag") return pass();
255
+ setStyle = "error";
256
+ return cont(attributes);
257
+ }
258
+ function attribute(type) {
259
+ if (type == "equals") return cont(attvalue, attributes);
260
+ if (!Kludges.allowMissing) setStyle = "error";
261
+ else if (type == "word") setStyle = "attribute";
262
+ return (type == "endTag" || type == "selfcloseTag") ? pass() : cont();
263
+ }
264
+ function attvalue(type) {
265
+ if (type == "string") return cont(attvaluemaybe);
266
+ if (type == "word" && Kludges.allowUnquoted) {setStyle = "string"; return cont();}
267
+ setStyle = "error";
268
+ return (type == "endTag" || type == "selfCloseTag") ? pass() : cont();
269
+ }
270
+ function attvaluemaybe(type) {
271
+ if (type == "string") return cont(attvaluemaybe);
272
+ else return pass();
273
+ }
274
+
275
+ return {
276
+ startState: function() {
277
+ return {tokenize: inText, cc: [], indented: 0, startOfLine: true, tagName: null, context: null};
278
+ },
279
+
280
+ token: function(stream, state) {
281
+ if (stream.sol()) {
282
+ state.startOfLine = true;
283
+ state.indented = stream.indentation();
284
+ }
285
+ if (stream.eatSpace()) return null;
286
+
287
+ setStyle = type = tagName = null;
288
+ var style = state.tokenize(stream, state);
289
+ state.type = type;
290
+ if ((style || type) && style != "comment") {
291
+ curState = state;
292
+ while (true) {
293
+ var comb = state.cc.pop() || element;
294
+ if (comb(type || style)) break;
295
+ }
296
+ }
297
+ state.startOfLine = false;
298
+ return setStyle || style;
299
+ },
300
+
301
+ indent: function(state, textAfter, fullLine) {
302
+ var context = state.context;
303
+ if ((state.tokenize != inTag && state.tokenize != inText) ||
304
+ context && context.noIndent)
305
+ return fullLine ? fullLine.match(/^(\s*)/)[0].length : 0;
306
+ if (alignCDATA && /<!\[CDATA\[/.test(textAfter)) return 0;
307
+ if (context && /^<\//.test(textAfter))
308
+ context = context.prev;
309
+ while (context && !context.startOfLine)
310
+ context = context.prev;
311
+ if (context) return context.indent + indentUnit;
312
+ else return 0;
313
+ },
314
+
315
+ electricChars: "/",
316
+
317
+ configuration: parserConfig.htmlMode ? "html" : "xml"
318
+ };
319
+ });
320
+
321
+ CodeMirror.defineMIME("text/xml", "xml");
322
+ CodeMirror.defineMIME("application/xml", "xml");
323
+ if (!CodeMirror.mimeModes.hasOwnProperty("text/html"))
324
+ CodeMirror.defineMIME("text/html", {name: "xml", htmlMode: true});
@@ -0,0 +1,32 @@
1
+ .CodeMirror-dialog {
2
+ position: absolute;
3
+ left: 0; right: 0;
4
+ background: white;
5
+ z-index: 15;
6
+ padding: .1em .8em;
7
+ overflow: hidden;
8
+ color: #333;
9
+ }
10
+
11
+ .CodeMirror-dialog-top {
12
+ border-bottom: 1px solid #eee;
13
+ top: 0;
14
+ }
15
+
16
+ .CodeMirror-dialog-bottom {
17
+ border-top: 1px solid #eee;
18
+ bottom: 0;
19
+ }
20
+
21
+ .CodeMirror-dialog input {
22
+ border: none;
23
+ outline: none;
24
+ background: transparent;
25
+ width: 20em;
26
+ color: inherit;
27
+ font-family: monospace;
28
+ }
29
+
30
+ .CodeMirror-dialog button {
31
+ font-size: 70%;
32
+ }
@@ -0,0 +1,242 @@
1
+ /* BASICS */
2
+
3
+ .CodeMirror {
4
+ /* Set height, width, borders, and global font properties here */
5
+ font-family: monospace;
6
+ height: 800px;
7
+ font-size: 16px;
8
+ line-height: 16px;
9
+ }
10
+ .CodeMirror-scroll {
11
+ /* Set scrolling behaviour here */
12
+ overflow: auto;
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 {
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
+ }
34
+ .CodeMirror-linenumbers {}
35
+ .CodeMirror-linenumber {
36
+ padding: 0 3px 0 5px;
37
+ min-width: 20px;
38
+ text-align: right;
39
+ color: #999;
40
+ }
41
+
42
+ /* CURSOR */
43
+
44
+ .CodeMirror div.CodeMirror-cursor {
45
+ border-left: 1px solid black;
46
+ }
47
+ /* Shown when moving in bi-directional text */
48
+ .CodeMirror div.CodeMirror-secondarycursor {
49
+ border-left: 1px solid silver;
50
+ }
51
+ .CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor {
52
+ width: auto;
53
+ border: 0;
54
+ background: transparent;
55
+ background: rgba(0, 200, 0, .4);
56
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#6600c800, endColorstr=#4c00c800);
57
+ }
58
+ /* Kludge to turn off filter in ie9+, which also accepts rgba */
59
+ .CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor:not(#nonsense_id) {
60
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
61
+ }
62
+ /* Can style cursor different in overwrite (non-insert) mode */
63
+ .CodeMirror div.CodeMirror-cursor.CodeMirror-overwrite {}
64
+
65
+ /* DEFAULT THEME */
66
+
67
+ .cm-s-default .cm-keyword {color: #708;}
68
+ .cm-s-default .cm-atom {color: #219;}
69
+ .cm-s-default .cm-number {color: #164;}
70
+ .cm-s-default .cm-def {color: #00f;}
71
+ .cm-s-default .cm-variable {color: black;}
72
+ .cm-s-default .cm-variable-2 {color: #05a;}
73
+ .cm-s-default .cm-variable-3 {color: #085;}
74
+ .cm-s-default .cm-property {color: black;}
75
+ .cm-s-default .cm-operator {color: black;}
76
+ .cm-s-default .cm-comment {color: #a50;}
77
+ .cm-s-default .cm-string {color: #a11;}
78
+ .cm-s-default .cm-string-2 {color: #f50;}
79
+ .cm-s-default .cm-meta {color: #555;}
80
+ .cm-s-default .cm-error {color: #f00;}
81
+ .cm-s-default .cm-qualifier {color: #555;}
82
+ .cm-s-default .cm-builtin {color: #30a;}
83
+ .cm-s-default .cm-bracket {color: #997;}
84
+ .cm-s-default .cm-tag {color: #170;}
85
+ .cm-s-default .cm-attribute {color: #00c;}
86
+ .cm-s-default .cm-header {color: blue;}
87
+ .cm-s-default .cm-quote {color: #090;}
88
+ .cm-s-default .cm-hr {color: #999;}
89
+ .cm-s-default .cm-link {color: #00c;}
90
+
91
+ .cm-negative {color: #d44;}
92
+ .cm-positive {color: #292;}
93
+ .cm-header, .cm-strong {font-weight: bold;}
94
+ .cm-em {font-style: italic;}
95
+ .cm-emstrong {font-style: italic; font-weight: bold;}
96
+ .cm-link {text-decoration: underline;}
97
+
98
+ .cm-invalidchar {color: #f00;}
99
+
100
+ div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
101
+ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
102
+
103
+ /* STOP */
104
+
105
+ /* The rest of this file contains styles related to the mechanics of
106
+ the editor. You probably shouldn't touch them. */
107
+
108
+ .CodeMirror {
109
+ line-height: 1;
110
+ position: relative;
111
+ overflow: hidden;
112
+ }
113
+
114
+ .CodeMirror-scroll {
115
+ /* 30px is the magic margin used to hide the element's real scrollbars */
116
+ /* See overflow: hidden in .CodeMirror, and the paddings in .CodeMirror-sizer */
117
+ margin-bottom: -30px; margin-right: -30px;
118
+ padding-bottom: 30px; padding-right: 30px;
119
+ height: 100%;
120
+ outline: none; /* Prevent dragging from highlighting the element */
121
+ position: relative;
122
+ }
123
+ .CodeMirror-sizer {
124
+ position: relative;
125
+ }
126
+
127
+ /* The fake, visible scrollbars. Used to force redraw during scrolling
128
+ before actuall scrolling happens, thus preventing shaking and
129
+ flickering artifacts. */
130
+ .CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler {
131
+ position: absolute;
132
+ z-index: 6;
133
+ display: none;
134
+ }
135
+ .CodeMirror-vscrollbar {
136
+ right: 0; top: 0;
137
+ overflow-x: hidden;
138
+ overflow-y: scroll;
139
+ }
140
+ .CodeMirror-hscrollbar {
141
+ bottom: 0; left: 0;
142
+ overflow-y: hidden;
143
+ overflow-x: scroll;
144
+ }
145
+ .CodeMirror-scrollbar-filler {
146
+ right: 0; bottom: 0;
147
+ z-index: 6;
148
+ }
149
+
150
+ .CodeMirror-gutters {
151
+ position: absolute; left: 0; top: 0;
152
+ height: 100%;
153
+ z-index: 3;
154
+ }
155
+ .CodeMirror-gutter {
156
+ height: 100%;
157
+ display: inline-block;
158
+ /* Hack to make IE7 behave */
159
+ *zoom:1;
160
+ *display:inline;
161
+ }
162
+ .CodeMirror-gutter-elt {
163
+ position: absolute;
164
+ cursor: default;
165
+ z-index: 4;
166
+ }
167
+
168
+ .CodeMirror-lines {
169
+ cursor: text;
170
+ }
171
+ .CodeMirror pre {
172
+ /* Reset some styles that the rest of the page might have set */
173
+ -moz-border-radius: 0; -webkit-border-radius: 0; -o-border-radius: 0; border-radius: 0;
174
+ border-width: 0;
175
+ background: transparent;
176
+ font-family: inherit;
177
+ font-size: inherit;
178
+ margin: 0;
179
+ white-space: pre;
180
+ word-wrap: normal;
181
+ line-height: inherit;
182
+ color: inherit;
183
+ z-index: 2;
184
+ position: relative;
185
+ overflow: visible;
186
+ }
187
+ .CodeMirror-wrap pre {
188
+ word-wrap: break-word;
189
+ white-space: pre-wrap;
190
+ word-break: normal;
191
+ }
192
+ .CodeMirror-linebackground {
193
+ position: absolute;
194
+ left: 0; right: 0; top: 0; bottom: 0;
195
+ z-index: 0;
196
+ }
197
+
198
+ .CodeMirror-linewidget {
199
+ position: relative;
200
+ z-index: 2;
201
+ overflow: auto;
202
+ }
203
+
204
+ .CodeMirror-wrap .CodeMirror-scroll {
205
+ overflow-x: hidden;
206
+ }
207
+
208
+ .CodeMirror-measure {
209
+ position: absolute;
210
+ width: 100%; height: 0px;
211
+ overflow: hidden;
212
+ visibility: hidden;
213
+ }
214
+ .CodeMirror-measure pre { position: static; }
215
+
216
+ .CodeMirror div.CodeMirror-cursor {
217
+ position: absolute;
218
+ visibility: hidden;
219
+ border-right: none;
220
+ width: 0;
221
+ }
222
+ .CodeMirror-focused div.CodeMirror-cursor {
223
+ visibility: visible;
224
+ }
225
+
226
+ .CodeMirror-selected { background: #d9d9d9; }
227
+ .CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
228
+
229
+ .cm-searching {
230
+ background: #ffa;
231
+ background: rgba(255, 255, 0, .4);
232
+ }
233
+
234
+ /* IE7 hack to prevent it from returning funny offsetTops on the spans */
235
+ .CodeMirror span { *vertical-align: text-bottom; }
236
+
237
+ @media print {
238
+ /* Hide the cursor when printing */
239
+ .CodeMirror div.CodeMirror-cursor {
240
+ visibility: hidden;
241
+ }
242
+ }