vinsol_spree_themes 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +36 -0
  3. data/.ruby-version +1 -0
  4. data/Appraisals +16 -0
  5. data/Gemfile +9 -0
  6. data/Gemfile.lock +386 -0
  7. data/LICENSE +26 -0
  8. data/README.md +250 -0
  9. data/Rakefile +21 -0
  10. data/app/assets/javascripts/spree/backend/codemirror/codemirror.js +9351 -0
  11. data/app/assets/javascripts/spree/backend/codemirror/css-hint.js +60 -0
  12. data/app/assets/javascripts/spree/backend/codemirror/fullscreen.js +41 -0
  13. data/app/assets/javascripts/spree/backend/codemirror/html-hint.js +348 -0
  14. data/app/assets/javascripts/spree/backend/codemirror/javascript-hint.js +155 -0
  15. data/app/assets/javascripts/spree/backend/codemirror/javascript.js +813 -0
  16. data/app/assets/javascripts/spree/backend/codemirror/markdown.js +796 -0
  17. data/app/assets/javascripts/spree/backend/codemirror/ruby.js +295 -0
  18. data/app/assets/javascripts/spree/backend/codemirror/show-hint.js +438 -0
  19. data/app/assets/javascripts/spree/backend/editor.js +11 -0
  20. data/app/assets/javascripts/spree/backend/jquery.treemenu.js +87 -0
  21. data/app/assets/javascripts/spree/backend/main.js +26 -0
  22. data/app/assets/javascripts/spree/backend/spree_themes.js +2 -0
  23. data/app/assets/javascripts/spree/backend/template.js +51 -0
  24. data/app/assets/javascripts/spree/backend/theme.js +17 -0
  25. data/app/assets/javascripts/spree/frontend/spree_themes.js +2 -0
  26. data/app/assets/stylesheets/spree/backend/codemirror/codemirror.css +340 -0
  27. data/app/assets/stylesheets/spree/backend/codemirror/fullscreen.css +6 -0
  28. data/app/assets/stylesheets/spree/backend/codemirror/show-hint.css +36 -0
  29. data/app/assets/stylesheets/spree/backend/editor.css +7 -0
  30. data/app/assets/stylesheets/spree/backend/jquery.treemenu.css +8 -0
  31. data/app/assets/stylesheets/spree/backend/spree_themes.css +7 -0
  32. data/app/assets/stylesheets/spree/backend/style.css +239 -0
  33. data/app/assets/stylesheets/spree/backend/template_editor.css +39 -0
  34. data/app/assets/stylesheets/spree/frontend/spree_themes.css +6 -0
  35. data/app/assets/stylesheets/spree/frontend/theme_preview.css +9 -0
  36. data/app/controllers/spree/admin/themes_controller.rb +80 -0
  37. data/app/controllers/spree/admin/themes_preview_controller.rb +30 -0
  38. data/app/controllers/spree/admin/themes_templates_controller.rb +60 -0
  39. data/app/controllers/spree/fragment_cache_controller.rb +13 -0
  40. data/app/controllers/spree/store_controller_decorator.rb +37 -0
  41. data/app/helpers/spree/base_helper_decorator.rb +45 -0
  42. data/app/models/spree/theme.rb +153 -0
  43. data/app/models/spree/themes_template.rb +67 -0
  44. data/app/models/spree/themes_template/cache_resolver.rb +37 -0
  45. data/app/overrides/spree/add_preview_bar_to_store.html.rb +6 -0
  46. data/app/overrides/spree/add_theme_meta_details_to_store.html.rb +6 -0
  47. data/app/overrides/spree/admin/add_themes_tab.html.rb +6 -0
  48. data/app/services/assets_precompiler_service.rb +86 -0
  49. data/app/services/file_generator_service.rb +29 -0
  50. data/app/services/template_generator_service.rb +101 -0
  51. data/app/services/zip_file_builder.rb +87 -0
  52. data/app/services/zip_file_extractor.rb +52 -0
  53. data/app/views/spree/admin/shared/_theme_menu_button.html.erb +5 -0
  54. data/app/views/spree/admin/themes/_themes.html.erb +44 -0
  55. data/app/views/spree/admin/themes/_upload.html.erb +17 -0
  56. data/app/views/spree/admin/themes/index.html.erb +50 -0
  57. data/app/views/spree/admin/themes_templates/_editor.html.erb +29 -0
  58. data/app/views/spree/admin/themes_templates/_template.html.erb +12 -0
  59. data/app/views/spree/admin/themes_templates/edit.html.erb +13 -0
  60. data/app/views/spree/admin/themes_templates/edit.js.erb +1 -0
  61. data/app/views/spree/admin/themes_templates/index.html.erb +27 -0
  62. data/app/views/spree/admin/themes_templates/new.html.erb +56 -0
  63. data/app/views/spree/shared/_preview_bar.html.erb +7 -0
  64. data/app/views/spree/shared/_theme_metadata.html.erb +9 -0
  65. data/bin/rails +7 -0
  66. data/config/initializers/assets.rb +24 -0
  67. data/config/initializers/sprockets.rb +85 -0
  68. data/config/locales/en.yml +52 -0
  69. data/config/routes.rb +22 -0
  70. data/db/migrate/20170628072452_vinsol_spree_themes_create_themes_and_themes_templates_table.rb +24 -0
  71. data/gemfiles/spree_3_1.gemfile +8 -0
  72. data/gemfiles/spree_3_2.gemfile +9 -0
  73. data/gemfiles/spree_master.gemfile +9 -0
  74. data/lib/generators/themes/default.zip +0 -0
  75. data/lib/generators/vinsol_spree_themes/install/install_generator.rb +50 -0
  76. data/lib/tasks/sync_templates.rake +47 -0
  77. data/lib/vinsol_spree_themes.rb +3 -0
  78. data/lib/vinsol_spree_themes/engine.rb +22 -0
  79. data/lib/vinsol_spree_themes/factories.rb +6 -0
  80. data/lib/vinsol_spree_themes/version.rb +18 -0
  81. data/spec/spec_helper.rb +93 -0
  82. data/vinsol_spree_themes.gemspec +43 -0
  83. metadata +374 -0
@@ -0,0 +1,11 @@
1
+ // manifest js file for initializing codemirror editor.
2
+
3
+ //= require 'spree/backend/codemirror/codemirror'
4
+ //= require 'spree/backend/codemirror/ruby'
5
+ //= require 'spree/backend/codemirror/css-hint'
6
+ //= require 'spree/backend/codemirror/html-hint'
7
+ //= require 'spree/backend/codemirror/javascript-hint'
8
+ //= require 'spree/backend/codemirror/show-hint'
9
+ //= require 'spree/backend/codemirror/javascript'
10
+ //= require 'spree/backend/codemirror/markdown'
11
+ //= require 'spree/backend/codemirror/fullscreen'
@@ -0,0 +1,87 @@
1
+ /*
2
+ treeMenu - jQuery plugin
3
+ version: 0.6
4
+
5
+ Copyright 2014 Stepan Krapivin
6
+
7
+ */
8
+ (function($){
9
+ $.fn.treemenu = function(options) {
10
+ options = options || {};
11
+ options.delay = options.delay || 0;
12
+ options.openActive = options.openActive || false;
13
+ options.closeOther = options.closeOther || false;
14
+ options.activeSelector = options.activeSelector || "active";
15
+
16
+ this.addClass("treemenu");
17
+
18
+ if (!options.nonroot) {
19
+ this.addClass("treemenu-root");
20
+ }
21
+
22
+ options.nonroot = true;
23
+
24
+ this.find("> li").each(function() {
25
+ e = $(this);
26
+ var subtree = e.find('> ul');
27
+ var button = e.find('.toggler').eq(0);
28
+
29
+ if(button.length == 0) {
30
+ // create toggler
31
+ var button = $('<span>');
32
+ button.addClass('toggler');
33
+ e.prepend(button);
34
+ }
35
+
36
+ if(subtree.length > 0) {
37
+ subtree.hide();
38
+
39
+ e.addClass('tree-closed');
40
+
41
+ e.find(button).click(function() {
42
+ var li = $(this).parent('li');
43
+
44
+ if (options.closeOther && li.hasClass('tree-closed')) {
45
+ var siblings = li.parent('ul').find("li:not(.tree-empty)");
46
+ siblings.removeClass("tree-opened");
47
+ siblings.addClass("tree-closed");
48
+ siblings.removeClass(options.activeSelector);
49
+ siblings.find('> ul').slideUp(options.delay);
50
+ }
51
+
52
+ li.find('> ul').slideToggle(options.delay);
53
+ li.toggleClass('tree-opened');
54
+ li.toggleClass('tree-closed');
55
+ li.toggleClass(options.activeSelector);
56
+ });
57
+
58
+ $(this).find('> ul').treemenu(options);
59
+ } else {
60
+ $(this).addClass('tree-empty');
61
+ }
62
+ });
63
+
64
+ if (options.openActive) {
65
+ var cls = this.attr("class");
66
+
67
+ this.find(options.activeSelector).each(function(){
68
+ var el = $(this).parent();
69
+
70
+ while (el.attr("class") !== cls) {
71
+ el.find('> ul').show();
72
+ if(el.prop("tagName") === 'UL') {
73
+ el.show();
74
+ } else if (el.prop("tagName") === 'LI') {
75
+ el.removeClass('tree-closed');
76
+ el.addClass("tree-opened");
77
+ el.show();
78
+ }
79
+
80
+ el = el.parent();
81
+ }
82
+ });
83
+ }
84
+
85
+ return this;
86
+ }
87
+ })(jQuery);
@@ -0,0 +1,26 @@
1
+ function Main() {
2
+
3
+ this.init = function() {
4
+ this.initializeEditor();
5
+ // this.initializeFileTreeMenu();
6
+ }
7
+
8
+ this.initializeEditor = function() {
9
+ var codeMirror = CodeMirror.fromTextArea($('#themes_template_body')[0], {
10
+ lineNumbers: true,
11
+ extraKeys: { "Ctrl-Space": "autocomplete" },
12
+ mode: { name: "javascript", globalVars: true }
13
+ });
14
+ codeMirror.setSize($('.admin-editor-section').width(), 800);
15
+ codeMirror.setSize($('.admin-editor-section').height(), 600);
16
+ }
17
+
18
+ // this.initializeFileTreeMenu = function() {
19
+ // $('#tree-menu-sidebar ul:first').addClass('tree');
20
+ // $(".tree").treemenu({delay:500});
21
+ // }
22
+ }
23
+
24
+ $(document).ready(function() {
25
+ new Main().init();
26
+ });
@@ -0,0 +1,2 @@
1
+ // Placeholder manifest file.
2
+ // the installer will append this file to the app vendored assets here: vendor/assets/javascripts/spree/backend/all.js'
@@ -0,0 +1,51 @@
1
+ function Template() {
2
+
3
+ this.init = function() {
4
+ // this.initializeTemplateSearch();
5
+ this.initializeTemplateTreeStructure();
6
+ this.bindEvents();
7
+ }
8
+
9
+ this.bindEvents = function() {
10
+ this.highlightFileName();
11
+ }
12
+
13
+ // this.initializeTemplateSearch = function() {
14
+ // $('#search-input').on('keyup', function() {
15
+ // var keyword = $(this).val().toUpperCase();
16
+ // var $table = $('#listing_templates');
17
+ // var rows = $table.find('tr');
18
+
19
+ // $.each(rows, function(i, val) {
20
+ // var td = $(this).find('td')[0];
21
+ // if(td) {
22
+ // // finding index 0 as searching on the basis of name only.
23
+ // var name = $(td).find('a.template-name')[0];
24
+
25
+ // if(name.innerHTML.toUpperCase().indexOf(keyword) > -1) {
26
+ // $(this).css('display','');
27
+ // } else {
28
+ // $(this).css('display','none');
29
+ // }
30
+ // }
31
+ // });
32
+ // });
33
+ // }
34
+
35
+ this.initializeTemplateTreeStructure = function() {
36
+ $('#tree-menu-sidebar ul:first').addClass('tree');
37
+ $(".tree").treemenu({ delay:500 });
38
+ }
39
+
40
+ this.highlightFileName = function() {
41
+ $('.file-link').on('click', function() {
42
+ $('.file-link').removeClass('highlight-file-link');
43
+ $(this).addClass('highlight-file-link');
44
+ });
45
+ }
46
+
47
+ }
48
+
49
+ $(document).ready(function() {
50
+ new Template().init();
51
+ });
@@ -0,0 +1,17 @@
1
+ function Theme() {
2
+
3
+ this.init = function() {
4
+ this.upload();
5
+ }
6
+
7
+ this.upload = function() {
8
+ $('#theme_template_file').on('change', function() {
9
+ $('#new_theme').submit();
10
+ });
11
+ }
12
+
13
+ }
14
+
15
+ $(document).ready(function() {
16
+ new Theme().init();
17
+ });
@@ -0,0 +1,2 @@
1
+ // Placeholder manifest file.
2
+ // the installer will append this file to the app vendored assets here: vendor/assets/javascripts/spree/frontend/all.js'
@@ -0,0 +1,340 @@
1
+ /* BASICS */
2
+
3
+ .CodeMirror {
4
+ /* Set height, width, borders, and global font properties here */
5
+ font-family: monospace;
6
+ height: 300px;
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: 1px 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 !important;
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-rulers {
92
+ position: absolute;
93
+ left: 0; right: 0; top: -50px; bottom: -20px;
94
+ overflow: hidden;
95
+ }
96
+ .CodeMirror-ruler {
97
+ border-left: 1px solid #ccc;
98
+ top: 0; bottom: 0;
99
+ position: absolute;
100
+ }
101
+
102
+ /* DEFAULT THEME */
103
+
104
+ .cm-s-default .cm-header {color: blue;}
105
+ .cm-s-default .cm-quote {color: #090;}
106
+ .cm-negative {color: #d44;}
107
+ .cm-positive {color: #292;}
108
+ .cm-header, .cm-strong {font-weight: bold;}
109
+ .cm-em {font-style: italic;}
110
+ .cm-link {text-decoration: underline;}
111
+ .cm-strikethrough {text-decoration: line-through;}
112
+
113
+ .cm-s-default .cm-keyword {color: #708;}
114
+ .cm-s-default .cm-atom {color: #219;}
115
+ .cm-s-default .cm-number {color: #164;}
116
+ .cm-s-default .cm-def {color: #00f;}
117
+ .cm-s-default .cm-variable,
118
+ .cm-s-default .cm-punctuation,
119
+ .cm-s-default .cm-property,
120
+ .cm-s-default .cm-operator {}
121
+ .cm-s-default .cm-variable-2 {color: #05a;}
122
+ .cm-s-default .cm-variable-3 {color: #085;}
123
+ .cm-s-default .cm-comment {color: #a50;}
124
+ .cm-s-default .cm-string {color: #a11;}
125
+ .cm-s-default .cm-string-2 {color: #f50;}
126
+ .cm-s-default .cm-meta {color: #555;}
127
+ .cm-s-default .cm-qualifier {color: #555;}
128
+ .cm-s-default .cm-builtin {color: #30a;}
129
+ .cm-s-default .cm-bracket {color: #997;}
130
+ .cm-s-default .cm-tag {color: #170;}
131
+ .cm-s-default .cm-attribute {color: #00c;}
132
+ .cm-s-default .cm-hr {color: #999;}
133
+ .cm-s-default .cm-link {color: #00c;}
134
+
135
+ .cm-s-default .cm-error {color: #f00;}
136
+ .cm-invalidchar {color: #f00;}
137
+
138
+ .CodeMirror-composing { border-bottom: 2px solid; }
139
+
140
+ /* Default styles for common addons */
141
+
142
+ div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
143
+ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
144
+ .CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
145
+ .CodeMirror-activeline-background {background: #e8f2ff;}
146
+
147
+ /* STOP */
148
+
149
+ /* The rest of this file contains styles related to the mechanics of
150
+ the editor. You probably shouldn't touch them. */
151
+
152
+ .CodeMirror {
153
+ position: relative;
154
+ overflow: hidden;
155
+ background: white;
156
+ }
157
+
158
+ .CodeMirror-scroll {
159
+ overflow: scroll !important; /* Things will break if this is overridden */
160
+ /* 30px is the magic margin used to hide the element's real scrollbars */
161
+ /* See overflow: hidden in .CodeMirror */
162
+ margin-bottom: -30px; margin-right: -30px;
163
+ padding-bottom: 30px;
164
+ height: 100%;
165
+ outline: none; /* Prevent dragging from highlighting the element */
166
+ position: relative;
167
+ }
168
+ .CodeMirror-sizer {
169
+ position: relative;
170
+ border-right: 30px solid transparent;
171
+ }
172
+
173
+ /* The fake, visible scrollbars. Used to force redraw during scrolling
174
+ before actual scrolling happens, thus preventing shaking and
175
+ flickering artifacts. */
176
+ .CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
177
+ position: absolute;
178
+ z-index: 6;
179
+ display: none;
180
+ }
181
+ .CodeMirror-vscrollbar {
182
+ right: 0; top: 0;
183
+ overflow-x: hidden;
184
+ overflow-y: scroll;
185
+ }
186
+ .CodeMirror-hscrollbar {
187
+ bottom: 0; left: 0;
188
+ overflow-y: hidden;
189
+ overflow-x: scroll;
190
+ }
191
+ .CodeMirror-scrollbar-filler {
192
+ right: 0; bottom: 0;
193
+ }
194
+ .CodeMirror-gutter-filler {
195
+ left: 0; bottom: 0;
196
+ }
197
+
198
+ .CodeMirror-gutters {
199
+ position: absolute; left: 0; top: 0;
200
+ min-height: 100%;
201
+ z-index: 3;
202
+ }
203
+ .CodeMirror-gutter {
204
+ white-space: normal;
205
+ height: 100%;
206
+ display: inline-block;
207
+ vertical-align: top;
208
+ margin-bottom: -30px;
209
+ }
210
+ .CodeMirror-gutter-wrapper {
211
+ position: absolute;
212
+ z-index: 4;
213
+ background: none !important;
214
+ border: none !important;
215
+ }
216
+ .CodeMirror-gutter-background {
217
+ position: absolute;
218
+ top: 0; bottom: 0;
219
+ z-index: 4;
220
+ }
221
+ .CodeMirror-gutter-elt {
222
+ position: absolute;
223
+ cursor: default;
224
+ z-index: 4;
225
+ }
226
+ .CodeMirror-gutter-wrapper ::selection { background-color: transparent }
227
+ .CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }
228
+
229
+ .CodeMirror-lines {
230
+ cursor: text;
231
+ min-height: 1px; /* prevents collapsing before first draw */
232
+ }
233
+ .CodeMirror pre {
234
+ /* Reset some styles that the rest of the page might have set */
235
+ -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
236
+ border-width: 0;
237
+ background: transparent;
238
+ font-family: inherit;
239
+ font-size: inherit;
240
+ margin: 0;
241
+ white-space: pre;
242
+ word-wrap: normal;
243
+ line-height: inherit;
244
+ color: inherit;
245
+ z-index: 2;
246
+ position: relative;
247
+ overflow: visible;
248
+ -webkit-tap-highlight-color: transparent;
249
+ -webkit-font-variant-ligatures: contextual;
250
+ font-variant-ligatures: contextual;
251
+ }
252
+ .CodeMirror-wrap pre {
253
+ word-wrap: break-word;
254
+ white-space: pre-wrap;
255
+ word-break: normal;
256
+ }
257
+
258
+ .CodeMirror-linebackground {
259
+ position: absolute;
260
+ left: 0; right: 0; top: 0; bottom: 0;
261
+ z-index: 0;
262
+ }
263
+
264
+ .CodeMirror-linewidget {
265
+ position: relative;
266
+ z-index: 2;
267
+ overflow: auto;
268
+ }
269
+
270
+ .CodeMirror-widget {}
271
+
272
+ .CodeMirror-rtl pre { direction: rtl; }
273
+
274
+ .CodeMirror-code {
275
+ outline: none;
276
+ }
277
+
278
+ /* Force content-box sizing for the elements where we expect it */
279
+ .CodeMirror-scroll,
280
+ .CodeMirror-sizer,
281
+ .CodeMirror-gutter,
282
+ .CodeMirror-gutters,
283
+ .CodeMirror-linenumber {
284
+ -moz-box-sizing: content-box;
285
+ box-sizing: content-box;
286
+ }
287
+
288
+ .CodeMirror-measure {
289
+ position: absolute;
290
+ width: 100%;
291
+ height: 0;
292
+ overflow: hidden;
293
+ visibility: hidden;
294
+ }
295
+
296
+ .CodeMirror-cursor {
297
+ position: absolute;
298
+ pointer-events: none;
299
+ }
300
+ .CodeMirror-measure pre { position: static; }
301
+
302
+ div.CodeMirror-cursors {
303
+ visibility: hidden;
304
+ position: relative;
305
+ z-index: 3;
306
+ }
307
+ div.CodeMirror-dragcursors {
308
+ visibility: visible;
309
+ }
310
+
311
+ .CodeMirror-focused div.CodeMirror-cursors {
312
+ visibility: visible;
313
+ }
314
+
315
+ .CodeMirror-selected { background: #d9d9d9; }
316
+ .CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
317
+ .CodeMirror-crosshair { cursor: crosshair; }
318
+ .CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }
319
+ .CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }
320
+
321
+ .cm-searching {
322
+ background: #ffa;
323
+ background: rgba(255, 255, 0, .4);
324
+ }
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; }