Skip to content

Commit 855ebbd

Browse files
Cherrglunny
authored andcommitted
gitea own dark codemirror theme (#7317)
* modify dark codemirror theme fix #6573 Signed-off-by: Michael Gnehr <michael@gnehr.de> * add selection color Signed-off-by: Michael Gnehr <michael@gnehr.de>
1 parent 7c0f2b9 commit 855ebbd

File tree

2 files changed

+137
-18
lines changed

2 files changed

+137
-18
lines changed

public/css/theme-arc-green.css

+26-4
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ input{background:#2e323e}
169169
.ui.bottom.attached.message{background-color:#2c662d;color:#87ab63}
170170
.ui.bottom.attached.message .pull-right{color:#87ab63}
171171
.ui.info.message{background-color:#2c3b4a;color:#9ebcc5}
172-
.CodeMirror div.CodeMirror-cursor{border-left:1px solid #9e9e9e}
173172
.ui .warning.header{background-color:#5d3a22!important;border-color:#794f31}
174173
.ui.red.message{background-color:rgba(80,23,17,.6);color:#f9cbcb;box-shadow:0 0 0 1px rgba(121,71,66,.5) inset,0 0 0 0 transparent}
175174
.ui.red.button,.ui.red.buttons .button{background-color:#7d3434}
@@ -219,8 +218,6 @@ a.ui.label:hover,a.ui.labels .label:hover{background-color:#505667;color:#dbdbdb
219218
.ui.modal>.content{background:#383c4a}
220219
.editor-toolbar{background-color:#404552}
221220
.editor-toolbar a{color:#87ab63!important}
222-
.CodeMirror{color:#9daccc;background-color:#2b2b2b;border-top:0}
223-
.CodeMirror-gutters{background-color:#2b2b2b}
224221
.repository .diff-detail-box{background-color:#383c4a}
225222
.repository .diff-detail-box .detail-files{background-color:inherit}
226223
.comment-code-cloud .ui.attached.tabular.menu{background:none transparent;border:0}
@@ -229,4 +226,29 @@ a.ui.label:hover,a.ui.labels .label:hover{background-color:#505667;color:#dbdbdb
229226
.ui.comments .comment .author{color:#dbdbdb}
230227
.ui.comments .comment .metadata{color:#808084}
231228
.ui.comments .comment .text{color:#9e9e9e}
232-
.heatmap-color-0{background-color:#2d303b}
229+
.heatmap-color-0{background-color:#2d303b}
230+
.CodeMirror{color:#9daccc;background-color:#2b2b2b;border-top:0}
231+
.CodeMirror div.CodeMirror-cursor{border-left:1px solid #9e9e9e}
232+
.CodeMirror .CodeMirror-gutters{background-color:#2b2b2b}
233+
.CodeMirror .CodeMirror-selected,.CodeMirror ::-moz-selection,.CodeMirror ::selection{background:#42402f!important}
234+
.CodeMirror.cm-s-default .cm-property,.CodeMirror.cm-s-paper .cm-property{color:#a0cc75}
235+
.CodeMirror.cm-s-default .cm-header,.CodeMirror.cm-s-paper .cm-header{color:#9daccc}
236+
.CodeMirror.cm-s-default .cm-quote,.CodeMirror.cm-s-paper .cm-quote{color:#090}
237+
.CodeMirror.cm-s-default .cm-keyword,.CodeMirror.cm-s-paper .cm-keyword{color:#cc8a61}
238+
.CodeMirror.cm-s-default .cm-atom,.CodeMirror.cm-s-paper .cm-atom{color:#ef5e77}
239+
.CodeMirror.cm-s-default .cm-number,.CodeMirror.cm-s-paper .cm-number{color:#ff5656}
240+
.CodeMirror.cm-s-default .cm-def,.CodeMirror.cm-s-paper .cm-def{color:#e4e4e4}
241+
.CodeMirror.cm-s-default .cm-variable-2,.CodeMirror.cm-s-paper .cm-variable-2{color:#00bdbf}
242+
.CodeMirror.cm-s-default .cm-variable-3,.CodeMirror.cm-s-paper .cm-variable-3{color:#085}
243+
.CodeMirror.cm-s-default .cm-comment,.CodeMirror.cm-s-paper .cm-comment{color:#8e9ab3}
244+
.CodeMirror.cm-s-default .cm-string,.CodeMirror.cm-s-paper .cm-string{color:#a77272}
245+
.CodeMirror.cm-s-default .cm-string-2,.CodeMirror.cm-s-paper .cm-string-2{color:#f50}
246+
.CodeMirror.cm-s-default .cm-meta,.CodeMirror.cm-s-default .cm-qualifier,.CodeMirror.cm-s-paper .cm-meta,.CodeMirror.cm-s-paper .cm-qualifier{color:#ffb176}
247+
.CodeMirror.cm-s-default .cm-builtin,.CodeMirror.cm-s-paper .cm-builtin{color:#b7c951}
248+
.CodeMirror.cm-s-default .cm-bracket,.CodeMirror.cm-s-paper .cm-bracket{color:#997}
249+
.CodeMirror.cm-s-default .cm-tag,.CodeMirror.cm-s-paper .cm-tag{color:#f1d273}
250+
.CodeMirror.cm-s-default .cm-attribute,.CodeMirror.cm-s-paper .cm-attribute{color:#bfcc70}
251+
.CodeMirror.cm-s-default .cm-hr,.CodeMirror.cm-s-paper .cm-hr{color:#999}
252+
.CodeMirror.cm-s-default .cm-url,.CodeMirror.cm-s-paper .cm-url{color:#c5cfd0}
253+
.CodeMirror.cm-s-default .cm-link,.CodeMirror.cm-s-paper .cm-link{color:#d8c792}
254+
.CodeMirror.cm-s-default .cm-error,.CodeMirror.cm-s-paper .cm-error{color:#dbdbeb}

public/less/themes/arc-green.less

+111-14
Original file line numberDiff line numberDiff line change
@@ -857,10 +857,6 @@ input {
857857
color: #9ebcc5;
858858
}
859859

860-
.CodeMirror div.CodeMirror-cursor {
861-
border-left: 1px solid #9e9e9e;
862-
}
863-
864860
.ui .warning.header {
865861
background-color: #5d3a22 !important;
866862
border-color: #794f31;
@@ -1134,16 +1130,6 @@ a.ui.labels .label:hover {
11341130
}
11351131
}
11361132

1137-
.CodeMirror {
1138-
color: #9daccc;
1139-
background-color: #2b2b2b;
1140-
border-top: 0;
1141-
}
1142-
1143-
.CodeMirror-gutters {
1144-
background-color: #2b2b2b;
1145-
}
1146-
11471133
.repository .diff-detail-box {
11481134
background-color: #383c4a;
11491135

@@ -1184,3 +1170,114 @@ a.ui.labels .label:hover {
11841170
.heatmap-color-0 {
11851171
background-color: #2d303b;
11861172
}
1173+
1174+
/* code mirror dark theme */
1175+
1176+
.CodeMirror {
1177+
color: #9daccc;
1178+
background-color: #2b2b2b;
1179+
border-top: 0;
1180+
1181+
div.CodeMirror-cursor {
1182+
border-left: 1px solid #9e9e9e;
1183+
}
1184+
1185+
.CodeMirror-gutters {
1186+
background-color: #2b2b2b;
1187+
}
1188+
1189+
::selection,
1190+
::-moz-selection,
1191+
.CodeMirror-selected {
1192+
background: #42402f !important;
1193+
}
1194+
1195+
&.cm-s-default,
1196+
&.cm-s-paper {
1197+
.cm-property {
1198+
color: #a0cc75;
1199+
}
1200+
1201+
.cm-header {
1202+
color: #9daccc;
1203+
}
1204+
1205+
.cm-quote {
1206+
color: #009900;
1207+
}
1208+
1209+
.cm-keyword {
1210+
color: #cc8a61;
1211+
}
1212+
1213+
.cm-atom {
1214+
color: #ef5e77;
1215+
}
1216+
1217+
.cm-number {
1218+
color: #ff5656;
1219+
}
1220+
1221+
.cm-def {
1222+
color: #e4e4e4;
1223+
}
1224+
1225+
.cm-variable-2 {
1226+
color: #00bdbf;
1227+
}
1228+
1229+
.cm-variable-3 {
1230+
color: #008855;
1231+
}
1232+
1233+
.cm-comment {
1234+
color: #8e9ab3;
1235+
}
1236+
1237+
.cm-string {
1238+
color: #a77272;
1239+
}
1240+
1241+
.cm-string-2 {
1242+
color: #ff5500;
1243+
}
1244+
1245+
.cm-meta,
1246+
.cm-qualifier {
1247+
color: #ffb176;
1248+
}
1249+
1250+
.cm-builtin {
1251+
color: #b7c951;
1252+
}
1253+
1254+
.cm-bracket {
1255+
color: #999977;
1256+
}
1257+
1258+
.cm-tag {
1259+
color: #f1d273;
1260+
}
1261+
1262+
.cm-attribute {
1263+
color: #bfcc70;
1264+
}
1265+
1266+
.cm-hr {
1267+
color: #999999;
1268+
}
1269+
1270+
.cm-url {
1271+
color: #c5cfd0;
1272+
}
1273+
1274+
.cm-link {
1275+
color: #d8c792;
1276+
}
1277+
1278+
.cm-error {
1279+
/* color: #ff6e00; */
1280+
color: #dbdbeb;
1281+
}
1282+
}
1283+
}

0 commit comments

Comments
 (0)