From 70408cede1ac6b5ebf4227aaa1dbffb0dccb47dd Mon Sep 17 00:00:00 2001 From: Prendota Date: Tue, 26 Jun 2018 09:52:55 +0300 Subject: [PATCH] [show-hints] support themes --- addon/hint/show-hint.js | 3 ++- theme/darcula.css | 4 ++-- theme/idea.css | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/addon/hint/show-hint.js b/addon/hint/show-hint.js index e85e18fa93..26dc0f00c4 100644 --- a/addon/hint/show-hint.js +++ b/addon/hint/show-hint.js @@ -200,7 +200,8 @@ var widget = this, cm = completion.cm; var hints = this.hints = document.createElement("ul"); - hints.className = "CodeMirror-hints"; + var theme = completion.cm.options.theme; + hints.className = "CodeMirror-hints " + theme; this.selectedHint = data.selectedHint || 0; var completions = data.list; diff --git a/theme/darcula.css b/theme/darcula.css index 7240d39b69..d66d2a5f21 100644 --- a/theme/darcula.css +++ b/theme/darcula.css @@ -34,13 +34,13 @@ .cm-s-darcula { font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif;} .cm-s-darcula .CodeMirror-matchingbracket { outline:1px solid #A9B7C6; color: yellow !important; } -.CodeMirror-hints { +.CodeMirror-hints.darcula { font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; color: #9c9e9e; background-color: #3b3e3f !important; } -.CodeMirror-hint-active { +.CodeMirror-hints.darcula .CodeMirror-hint-active { background-color: #494d4e !important; color: #9c9e9e !important; } diff --git a/theme/idea.css b/theme/idea.css index 5cdb883e8a..eab36717ad 100644 --- a/theme/idea.css +++ b/theme/idea.css @@ -30,13 +30,13 @@ .cm-s-idea .CodeMirror-matchingbracket { outline:1px solid grey; color:black !important; } -.CodeMirror-hints { +.CodeMirror-hints.idea { font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; color: #616569; background-color: #ebf3fd !important; } -.CodeMirror-hint-active { +.CodeMirror-hints.idea .CodeMirror-hint-active { background-color: #a2b8c9 !important; color: #5c6065 !important; } \ No newline at end of file