Skip to content

Commit d7708f4

Browse files
authored
Merge pull request #94 from segment-oj/add-lang-select-code-mirror-ztl
Add lang select code mirror ztl
2 parents 523e3dc + eae9659 commit d7708f4

File tree

11 files changed

+413
-138
lines changed

11 files changed

+413
-138
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
.CodeMirror {
2+
height: 600px !important;
3+
background-color: #fcfcfc;
4+
color: #4d4d4c;
5+
}
6+
7+
.CodeMirror-linenumber {
8+
font-family: "Fira Code" !important;
9+
}
10+
11+
.CodeMirror-foldmarker {
12+
text-shadow: none !important;
13+
color: #8e908c !important;
14+
font-family: "Fira Sans" !important;
15+
outline: 1px solid #d6d6d6 !important;
16+
-moz-outline-radius: 3px !important;
17+
}
18+
19+
.CodeMirror-hints {
20+
max-height: 200px !important;
21+
box-shadow: none !important;
22+
border-color: #dcdfe6 !important;
23+
background-color: #fefefe !important;
24+
font-family: "Fira Code" !important;
25+
padding: 5px !important;
26+
}
27+
28+
.CodeMirror-hint {
29+
line-height: 20px;
30+
color: #444444 !important;
31+
}
32+
33+
li.CodeMirror-hint-active {
34+
background-color: #efefef !important;
35+
color: #444444 !important;
36+
font-weight: 500;
37+
}
38+
39+
.CodeMirror-selection-highlight-scrollbar {
40+
margin-right: 2.5px !important;
41+
width: 5px !important;
42+
background-color: #8e908c !important;
43+
opacity: 0.6 !important;
44+
}
45+
46+
.CodeMirror-simplescroll-horizontal div,
47+
.CodeMirror-simplescroll-vertical div {
48+
background: #b3b3b3 !important;
49+
border: none !important;
50+
border-radius: 0 !important;
51+
}
52+
53+
.CodeMirror-simplescroll-vertical {
54+
width: 10px !important;
55+
}
56+
57+
.CodeMirror-simplescroll-horizontal {
58+
height: 10px !important;
59+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
.cm-s-ayu-mirage span.cm-comment {
2+
color: #5c6773 !important;
3+
}
4+
5+
.cm-s-ayu-mirage span.cm-atom {
6+
color: #ffd580 !important;
7+
}
8+
9+
.cm-s-ayu-mirage .cm-matchhighlight {
10+
background-color: #323a4c !important;
11+
}
12+
13+
.cm-s-ayu-mirage .CodeMirror-matchingbracket {
14+
background-color: #323a4c !important;
15+
text-decoration: none !important;
16+
}
17+
18+
.cm-s-ayu-mirage .CodeMirror-cursor {
19+
border-left: 2px solid #ffcc66 !important;
20+
}

src/assets/code_mirror/monokai.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.cm-s-monokai span.cm-comment {
2+
color: #75715e !important;
3+
}
4+
5+
.cm-s-monokai .cm-matchhighlight {
6+
background-color: #49483e;
7+
}

src/assets/code_mirror/neo.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
.cm-s-neo .CodeMirror-matchingbracket {
2+
color: #4d4d4c !important;
3+
outline: 1px solid #d6d6d6 !important;
4+
-moz-outline-radius: 3px !important;
5+
}
6+
7+
.cm-s-neo .CodeMirror-nonmatchingbracket {
8+
color: #c82829 !important;
9+
outline: 1px solid #c82829 !important;
10+
-moz-outline-radius: 3px !important;
11+
}
12+
13+
.cm-s-neo .cm-matchhighlight {
14+
background-color: #dddddd !important;
15+
}
Lines changed: 50 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -1,160 +1,104 @@
1-
.CodeMirror {
2-
height: 600px !important;
3-
background-color: #fcfcfc;
4-
color: #4d4d4c;
1+
.cm-s-3024-day .CodeMirror-cursor {
2+
opacity: 0.7 !important;
3+
border-left: 2px solid #4d4d4c !important;
54
}
65

7-
.CodeMirror-cursor {
8-
opacity: 0.7;
9-
border-left: 2px solid #4d4d4c;
10-
}
11-
12-
.cm-qualifier {
6+
.cm-s-3024-day span.cm-qualifier {
137
color: #c82829;
148
}
159

16-
.cm-property {
10+
.cm-s-3024-day span.cm-property {
1711
color: #eab700;
1812
}
1913

20-
.cm-meta,
21-
.cm-number,
22-
.cm-atom {
14+
.cm-s-3024-day span.cm-meta,
15+
span.cm-number,
16+
span.cm-atom {
2317
color: #f5871f;
2418
}
2519

26-
.cm-comment {
20+
.cm-s-3024-day span.cm-comment {
2721
color: #8e908c !important;
2822
}
2923

30-
.cm-keyword,
31-
.cm-type,
32-
.cm-tag {
24+
.cm-s-3024-day span.cm-keyword,
25+
span.cm-type,
26+
span.cm-tag {
3327
color: #8959a8;
3428
}
3529

36-
.cm-def {
30+
.cm-s-3024-day span.cm-def {
3731
color: #4271ae;
3832
}
3933

40-
.cm-string {
41-
color: #718c00 !important;
34+
.cm-s-3024-day span.cm-string {
35+
color: #718c00;
4236
}
4337

44-
.CodeMirror-linebackground,
45-
.CodeMirror-activeline-background {
46-
background-color: #efefef !important;
38+
.cm-s-3024-day span.cm-operator {
39+
color: #3e999f;
4740
}
4841

49-
.cm-operator {
50-
color: #3e999f !important;
42+
.cm-s-3024-day .CodeMirror-linebackground,
43+
.CodeMirror-activeline-background {
44+
background-color: #efefef;
5145
}
5246

53-
.CodeMirror-selected {
47+
.cm-s-3024-day .CodeMirror-selected {
5448
background-color: #d6d6d6 !important;
5549
}
5650

57-
.CodeMirror-gutters {
58-
background: #fcfcfc;
59-
border-right: none;
51+
.cm-s-3024-day .CodeMirror-gutters {
52+
background: #fcfcfc !important;
53+
border-right: none !important;
6054
}
6155

62-
.CodeMirror-linenumber {
63-
color: #909399;
64-
font-size: 15px;
56+
.cm-s-3024-day .CodeMirror-linenumber {
57+
color: #909399 !important;
58+
font-size: 15px !important;
6559
}
6660

67-
.CodeMirror-matchingbracket {
61+
.cm-s-3024-day .CodeMirror-matchingbracket {
6862
color: #4d4d4c !important;
69-
outline: 1px solid #d6d6d6;
70-
-moz-outline-radius: 3px;
63+
outline: 1px solid #d6d6d6 !important;
64+
-moz-outline-radius: 3px !important;
7165
}
7266

73-
.CodeMirror-nonmatchingbracket {
67+
.cm-s-3024-day .CodeMirror-nonmatchingbracket {
7468
color: #c82829 !important;
75-
outline: 1px solid #c82829;
76-
-moz-outline-radius: 3px;
77-
}
78-
79-
.CodeMirror-foldmarker {
80-
text-shadow: none !important;
81-
color: #8e908c !important;
82-
font-family: "Fira Sans" !important;
83-
outline: 1px solid #d6d6d6;
84-
-moz-outline-radius: 3px;
69+
outline: 1px solid #c82829 !important;
70+
-moz-outline-radius: 3px !important;
8571
}
8672

87-
.CodeMirror span[role="presentation"] {
88-
font-size: 14px;
73+
.cm-s-3024-day .CodeMirror span[role="presentation"] {
74+
font-size: 14px !important;
8975
}
9076

91-
.CodeMirror-hints {
92-
max-height: 200px !important;
93-
box-shadow: none !important;
94-
border-color: #dcdfe6 !important;
77+
.cm-s-3024-day .CodeMirror-dialog {
9578
background-color: #fefefe !important;
96-
font-family: "Fira Code" !important;
97-
padding: 5px !important;
98-
}
99-
100-
.CodeMirror-hint {
101-
line-height: 20px;
102-
color: #444444 !important;
10379
}
10480

105-
li.CodeMirror-hint-active {
106-
background-color: #efefef !important;
107-
color: #444444 !important;
108-
font-weight: 500;
109-
}
110-
111-
.CodeMirror-dialog {
112-
background-color: #fefefe !important;
113-
}
114-
115-
.cm-searching {
116-
background-color: #d6d6d6;
81+
.cm-s-3024-day .cm-searching {
82+
background-color: #d6d6d6 !important;
11783
}
11884

119-
.CodeMirror-search-label {
120-
line-height: 24px;
121-
font-weight: 500;
85+
.cm-s-3024-day .CodeMirror-search-label {
86+
line-height: 24px !important;
87+
font-weight: 500 !important;
12288
}
12389

124-
.CodeMirror-search-field {
125-
line-height: 20px;
90+
.cm-s-3024-day .CodeMirror-search-field {
91+
line-height: 20px !important;
12692
border: 1px solid #dcdfe6 !important;
127-
width: 50em !important;
128-
}
129-
130-
.CodeMirror-search-hint {
131-
line-height: 25px;
132-
float: right;
133-
}
134-
135-
.cm-matchhighlight {
136-
outline: 1px solid #d6d6d6;
137-
-moz-outline-radius: 3px;
138-
}
139-
140-
.CodeMirror-selection-highlight-scrollbar {
141-
margin-right: 2.5px;
142-
width: 5px !important;
143-
background-color: #8e908c;
144-
opacity: 0.6;
145-
}
146-
147-
.CodeMirror-simplescroll-horizontal div,
148-
.CodeMirror-simplescroll-vertical div {
149-
background: #b3b3b3 !important;
150-
border: none !important;
151-
border-radius: 0 !important;
93+
width: 30em !important;
15294
}
15395

154-
.CodeMirror-simplescroll-vertical {
155-
width: 10px !important;
96+
.cm-s-3024-day .CodeMirror-search-hint {
97+
line-height: 25px !important;
98+
float: right !important;
15699
}
157100

158-
.CodeMirror-simplescroll-horizontal {
159-
height: 10px !important;
101+
.cm-s-3024-day .cm-matchhighlight {
102+
outline: 1px solid #d6d6d6 !important;
103+
-moz-outline-radius: 3px !important;
160104
}

src/assets/code_mirror/zenburn.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.cm-s-zenburn span.cm-type {
2+
color: #dcdccc;
3+
}

0 commit comments

Comments
 (0)