Skip to content

Commit

Permalink
CodeMirror自动提示配色
Browse files Browse the repository at this point in the history
  • Loading branch information
datageartech committed Dec 3, 2021
1 parent 0a379ca commit 10f64fe
Show file tree
Hide file tree
Showing 7 changed files with 122 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,18 @@
text-decoration: underline;
color: white !important;
}

.CodeMirror-hints.custom {
background: #000 !important;
border: 1px solid #666666;
color: #ffb496 !important;
-webkit-box-shadow: 0px 0px 6px #cccccc;
box-shadow: 0px 0px 6px #cccccc;
}
.CodeMirror-hints.custom .CodeMirror-hint{
color: #ffb496;
}
.CodeMirror-hints.custom .CodeMirror-hint-active {
background-color: #444 !important;
color: #ffb496 !important;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
由codemirror-5.64.0/theme/ayu-dark.css修改:

1. "ayu-dark" 替换为 "custom"
2. "#0a0e14" 替换为 "#000"
1.
"ayu-dark" 替换为 "custom"

2.
"#0a0e14" 替换为 "#000"

3.
新增

.CodeMirror-hints.custom {
background: #000 !important;
border: 1px solid #666666;
color: #ffb496 !important;
-webkit-box-shadow: 0px 0px 6px #cccccc;
box-shadow: 0px 0px 6px #cccccc;
}
.CodeMirror-hints.custom .CodeMirror-hint{
color: #ffb496;
}
.CodeMirror-hints.custom .CodeMirror-hint-active {
background-color: #444 !important;
color: #ffb496 !important;
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,18 @@

.cm-s-custom .CodeMirror-activeline-background { background: #002D57; }
.cm-s-custom .CodeMirror-matchingbracket { outline:1px solid grey;color:white !important; }

.CodeMirror-hints.custom {
background: #285c00 !important;
border: 1px solid #45930b;
color: #e3e3e3 !important;
-webkit-box-shadow: 0px 0px 6px #cccccc;
box-shadow: 0px 0px 6px #cccccc;
}
.CodeMirror-hints.custom .CodeMirror-hint{
color: #e3e3e3;
}
.CodeMirror-hints.custom .CodeMirror-hint-active {
background-color: #459e05 !important;
color: #e3e3e3 !important;
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
由codemirror-5.64.0/theme/cobalt.css修改:

1. "cobalt" 替换为 "custom"
2. "#002240" 替换为 "#285c00"
3. "#3ad900" 替换为 "#f9f951"
1.
"cobalt" 替换为 "custom"

2.
"#002240" 替换为 "#285c00"

3.
"#3ad900" 替换为 "#f9f951"

4.
新增

.CodeMirror-hints.custom {
background: #285c00 !important;
border: 1px solid #45930b;
color: #e3e3e3 !important;
-webkit-box-shadow: 0px 0px 6px #cccccc;
box-shadow: 0px 0px 6px #cccccc;
}
.CodeMirror-hints.custom .CodeMirror-hint{
color: #e3e3e3;
}
.CodeMirror-hints.custom .CodeMirror-hint-active {
background-color: #459e05 !important;
color: #e3e3e3 !important;
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,16 @@
.cm-s-custom .CodeMirror-matchingbracket { outline:1px solid grey; color:black !important; }

.CodeMirror-hints.custom {
font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;
color: #616569;
background-color: #ebf3fd !important;
background-color: #fff !important;
border: 1px solid #dddddd;
color: #333333;
-webkit-box-shadow: 0px 0px 5px #666666;
box-shadow: 0px 0px 5px #666666;
}
.CodeMirror-hints.custom .CodeMirror-hint{
color: #333333;
}

.CodeMirror-hints.custom .CodeMirror-hint-active {
background-color: #a2b8c9 !important;
color: #5c6065 !important;
background-color: #ededed !important;
color: #333333 !important;
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
由codemirror-5.64.0/theme/idea.css修改:

1. "idea" 替换为 "custom"
1.
"idea" 替换为 "custom"

2.
.CodeMirror-hints.custom {
font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;
color: #616569;
background-color: #ebf3fd !important;
}

.CodeMirror-hints.custom .CodeMirror-hint-active {
background-color: #a2b8c9 !important;
color: #5c6065 !important;
}

替换为

.CodeMirror-hints.custom {
background-color: #fff !important;
border: 1px solid #dddddd;
color: #333333;
-webkit-box-shadow: 0px 0px 5px #666666;
box-shadow: 0px 0px 5px #666666;
}
.CodeMirror-hints.custom .CodeMirror-hint{
color: #333333;
}
.CodeMirror-hints.custom .CodeMirror-hint-active {
background-color: #ededed !important;
color: #333333 !important;
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ page_js_obj.ftl
if(options.hintOptions)
options.hintOptions.completeSingle = false;
if(options.hintOptions)
options.hintOptions.closeOnUnfocus = false;
//if(options.hintOptions)
// options.hintOptions.closeOnUnfocus = false;
return CodeMirror(dom, options);
};
Expand Down

0 comments on commit 10f64fe

Please sign in to comment.