Skip to content

Commit 87ad55d

Browse files
authored
fix: Multiple improvements for Ace themes (#4715)
1 parent 375498a commit 87ad55d

18 files changed

+595
-36
lines changed

lib/ace/autocomplete/popup.js

+22-21
Original file line numberDiff line numberDiff line change
@@ -320,40 +320,43 @@ var AcePopup = function(parentNode) {
320320
};
321321

322322
dom.importCssString("\
323-
.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\
323+
.ace_autocomplete.ace-tm .ace_marker-layer .ace_active-line {\
324324
background-color: #CAD6FA;\
325325
z-index: 1;\
326326
}\
327-
.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\
328-
background-color: #3a674e;\
329-
}\
330-
.ace_editor.ace_autocomplete .ace_line-hover {\
327+
.ace_autocomplete.ace-tm .ace_line-hover {\
331328
border: 1px solid #abbffe;\
332329
margin-top: -1px;\
333330
background: rgba(233,233,253,0.4);\
331+
}\
332+
.ace_autocomplete .ace_line-hover {\
334333
position: absolute;\
335334
z-index: 2;\
336335
}\
337-
.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {\
338-
border: 1px solid rgba(109, 150, 13, 0.8);\
339-
background: rgba(58, 103, 78, 0.62);\
336+
.ace_autocomplete .ace_scroller {\
337+
background: none;\
338+
border: none;\
339+
box-shadow: none;\
340340
}\
341-
.ace_completion-meta {\
342-
opacity: 0.5;\
343-
margin: 0.9em;\
341+
.ace_rightAlignedText {\
342+
color: gray;\
343+
display: inline-block;\
344+
position: absolute;\
345+
right: 4px;\
346+
text-align: right;\
347+
z-index: -1;\
344348
}\
345349
.ace_completion-message {\
346350
color: blue;\
347351
}\
348-
.ace_editor.ace_autocomplete .ace_completion-highlight{\
349-
color: #2d69c7;\
352+
.ace_autocomplete .ace_completion-highlight{\ color: #000;\
353+
text-shadow: 0 0 0.01em;\
350354
}\
351-
.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{\
352-
color: #93ca12;\
353-
}\
354-
.ace_editor.ace_autocomplete {\
355-
width: 300px;\
355+
.ace_autocomplete {\
356+
width: 280px;\
356357
z-index: 200000;\
358+
background: #fbfbfb;\
359+
color: #444;\
357360
border: 1px lightgray solid;\
358361
position: fixed;\
359362
box-shadow: 2px 3px 5px rgba(0,0,0,.2);\
@@ -371,6 +374,4 @@ dom.importCssString("\
371374

372375
exports.AcePopup = AcePopup;
373376
exports.$singleLineEditor = $singleLineEditor;
374-
});
375-
376-
377+
});

lib/ace/css/editor.css

-4
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,6 @@ styles.join("\n")
7171
background: rgba(0, 0, 0, 0.01);
7272
}
7373

74-
.ace_selecting, .ace_selecting * {
75-
cursor: text !important;
76-
}
77-
7874
.ace_gutter {
7975
position: absolute;
8076
overflow : hidden;

lib/ace/ext/themelist.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ var themeData = [
5454
["Solarized Light"],
5555
["TextMate" ],
5656
["Tomorrow" ],
57-
["Xcode" ],
57+
["XCode" ],
5858
["Kuroir"],
5959
["KatzenMilch"],
6060
["SQL Server" ,"sqlserver" , "light"],

lib/ace/theme/chrome.css

+4-2
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@
8080
color: rgb(0, 0, 205);
8181
}
8282

83-
.ace-chrome .ace_variable {
83+
.ace-chrome .ace_variable,
84+
.ace-chrome .ace_variable:not(.ace_parameter),
85+
.ace-chrome .ace_constant:not(.ace_numeric) {
8486
color: rgb(49, 132, 149);
8587
}
8688

@@ -151,4 +153,4 @@
151153

152154
.ace-chrome .ace_indent-guide {
153155
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
154-
}
156+
}

lib/ace/theme/cloud9_day.css

+156
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
.ace-cloud9-day .ace_gutter {
2+
background: #ECECEC;
3+
color: #333;
4+
}
5+
6+
.ace-cloud9-day .ace_print-margin {
7+
width: 1px;
8+
background: #e8e8e8;
9+
}
10+
11+
.ace-cloud9-day .ace_fold {
12+
background-color: #6B72E6;
13+
}
14+
15+
.ace-cloud9-day {
16+
background-color: #FBFBFB;
17+
color: black;
18+
}
19+
20+
.ace-cloud9-day .ace_cursor {
21+
color: black;
22+
}
23+
24+
.ace-cloud9-day .ace_invisible {
25+
color: rgb(191, 191, 191);
26+
}
27+
28+
.ace-cloud9-day .ace_storage,
29+
.ace-cloud9-day .ace_keyword {
30+
color: rgb(24, 122, 234);
31+
}
32+
33+
.ace-cloud9-day .ace_constant {
34+
color: rgb(197, 6, 11);
35+
}
36+
37+
.ace-cloud9-day .ace_constant.ace_buildin {
38+
color: rgb(88, 72, 246);
39+
}
40+
41+
.ace-cloud9-day .ace_constant.ace_language {
42+
color: rgb(88, 92, 246);
43+
}
44+
45+
.ace-cloud9-day .ace_constant.ace_library {
46+
color: rgb(6, 150, 14);
47+
}
48+
49+
.ace-cloud9-day .ace_invalid {
50+
background-color: rgba(255, 0, 0, 0.1);
51+
color: red;
52+
}
53+
54+
.ace-cloud9-day .ace_support.ace_function {
55+
color: rgb(60, 76, 114);
56+
}
57+
58+
.ace-cloud9-day .ace_support.ace_constant {
59+
color: rgb(6, 150, 14);
60+
}
61+
62+
.ace-cloud9-day .ace_support.ace_type,
63+
.ace-cloud9-day .ace_support.ace_class {
64+
color: rgb(109, 121, 222);
65+
}
66+
67+
.ace-cloud9-day .ace_keyword.ace_operator {
68+
color: rgb(104, 118, 135);
69+
}
70+
71+
.ace-cloud9-day .ace_string {
72+
color: rgb(3, 106, 7);
73+
}
74+
75+
.ace-cloud9-day .ace_comment {
76+
color: rgb(76, 136, 107);
77+
}
78+
79+
.ace-cloud9-day .ace_comment.ace_doc {
80+
color: rgb(0, 102, 255);
81+
}
82+
83+
.ace-cloud9-day .ace_comment.ace_doc.ace_tag {
84+
color: rgb(128, 159, 191);
85+
}
86+
87+
.ace-cloud9-day .ace_constant.ace_numeric {
88+
color: rgb(0, 0, 205);
89+
}
90+
91+
.ace-cloud9-day .ace_variable {
92+
color: rgb(49, 132, 149);
93+
}
94+
95+
.ace-cloud9-day .ace_xml-pe {
96+
color: rgb(104, 104, 91);
97+
}
98+
99+
.ace-cloud9-day .ace_entity.ace_name.ace_function {
100+
color: #0000A2;
101+
}
102+
103+
104+
.ace-cloud9-day .ace_heading {
105+
color: rgb(12, 7, 255);
106+
}
107+
108+
.ace-cloud9-day .ace_list {
109+
color: rgb(185, 6, 144);
110+
}
111+
112+
.ace-cloud9-day .ace_meta.ace_tag {
113+
color: rgb(0, 22, 142);
114+
}
115+
116+
.ace-cloud9-day .ace_string.ace_regex {
117+
color: rgb(255, 0, 0)
118+
}
119+
120+
.ace-cloud9-day .ace_marker-layer .ace_selection {
121+
background: rgb(181, 213, 255);
122+
}
123+
124+
.ace-cloud9-day.ace_multiselect .ace_selection.ace_start {
125+
box-shadow: 0 0 3px 0px white;
126+
}
127+
128+
.ace-cloud9-day .ace_marker-layer .ace_step {
129+
background: rgb(247, 237, 137);
130+
}
131+
132+
.ace-cloud9-day .ace_marker-layer .ace_stack {
133+
background: #BAE0A0;
134+
}
135+
136+
.ace-cloud9-day .ace_marker-layer .ace_bracket {
137+
margin: -1px 0 0 -1px;
138+
border: 1px solid rgb(192, 192, 192);
139+
}
140+
141+
.ace-cloud9-day .ace_marker-layer .ace_active-line {
142+
background: rgba(0, 0, 0, 0.07);
143+
}
144+
145+
.ace-cloud9-day .ace_gutter-active-line {
146+
background-color: #E5E5E5;
147+
}
148+
149+
.ace-cloud9-day .ace_marker-layer .ace_selected-word {
150+
background: rgb(250, 250, 255);
151+
border: 1px solid rgb(200, 200, 250);
152+
}
153+
154+
.ace-cloud9-day .ace_indent-guide {
155+
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
156+
}

lib/ace/theme/cloud9_day.js

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/* ***** BEGIN LICENSE BLOCK *****
2+
* Distributed under the BSD license:
3+
*
4+
* Copyright (c) 2010, Ajax.org B.V.
5+
* All rights reserved.
6+
*
7+
* Redistribution and use in source and binary forms, with or without
8+
* modification, are permitted provided that the following conditions are met:
9+
* * Redistributions of source code must retain the above copyright
10+
* notice, this list of conditions and the following disclaimer.
11+
* * Redistributions in binary form must reproduce the above copyright
12+
* notice, this list of conditions and the following disclaimer in the
13+
* documentation and/or other materials provided with the distribution.
14+
* * Neither the name of Ajax.org B.V. nor the
15+
* names of its contributors may be used to endorse or promote products
16+
* derived from this software without specific prior written permission.
17+
*
18+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21+
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
22+
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25+
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27+
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28+
*
29+
* ***** END LICENSE BLOCK ***** */
30+
31+
define(function (require, exports, module) {
32+
"use strict";
33+
34+
exports.isDark = false;
35+
exports.cssClass = "ace-cloud9-day";
36+
exports.cssText = require("../requirejs/text!./cloud9_day.css");
37+
38+
var dom = require("../lib/dom");
39+
dom.importCssString(exports.cssText, exports.cssClass);
40+
});

0 commit comments

Comments
 (0)