Skip to content

Commit 70408ce

Browse files
AlexanderPrendotamarijnh
authored andcommitted
[show-hints] support themes
1 parent ed8dfeb commit 70408ce

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

addon/hint/show-hint.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,8 @@
200200
var widget = this, cm = completion.cm;
201201

202202
var hints = this.hints = document.createElement("ul");
203-
hints.className = "CodeMirror-hints";
203+
var theme = completion.cm.options.theme;
204+
hints.className = "CodeMirror-hints " + theme;
204205
this.selectedHint = data.selectedHint || 0;
205206

206207
var completions = data.list;

theme/darcula.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@
3434
.cm-s-darcula { font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif;}
3535
.cm-s-darcula .CodeMirror-matchingbracket { outline:1px solid #A9B7C6; color: yellow !important; }
3636

37-
.CodeMirror-hints {
37+
.CodeMirror-hints.darcula {
3838
font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;
3939
color: #9c9e9e;
4040
background-color: #3b3e3f !important;
4141
}
4242

43-
.CodeMirror-hint-active {
43+
.CodeMirror-hints.darcula .CodeMirror-hint-active {
4444
background-color: #494d4e !important;
4545
color: #9c9e9e !important;
4646
}

theme/idea.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@
3030

3131
.cm-s-idea .CodeMirror-matchingbracket { outline:1px solid grey; color:black !important; }
3232

33-
.CodeMirror-hints {
33+
.CodeMirror-hints.idea {
3434
font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;
3535
color: #616569;
3636
background-color: #ebf3fd !important;
3737
}
3838

39-
.CodeMirror-hint-active {
39+
.CodeMirror-hints.idea .CodeMirror-hint-active {
4040
background-color: #a2b8c9 !important;
4141
color: #5c6065 !important;
4242
}

0 commit comments

Comments
 (0)