kevin1207 commited on
Commit
9682c45
·
verified ·
1 Parent(s): c65ce5d

Update custom.css

Browse files
Files changed (1) hide show
  1. custom.css +122 -22
custom.css CHANGED
@@ -1,20 +1,20 @@
1
  @font-face {
2
  font-family: 'Dank Mono';
3
- src: url('../assets/fonts/JetBrainsMono-Regular.woff2') format('woff2');
4
  font-display: swap;
5
  font-style: normal;
6
  }
7
 
8
  @font-face {
9
  font-family: 'Dank Mono';
10
- src: url('../assets/fonts/JetBrainsMono-Italic.woff2') format('woff2');
11
  font-display: swap;
12
  font-style: italic;
13
  }
14
 
15
  @font-face {
16
  font-family: 'JinBuTi';
17
- src: url('../assets/fonts/JetBrainsMono-SemiBold.woff2') format('woff2');
18
  font-display: swap;
19
  }
20
 
@@ -23,52 +23,76 @@ html {
23
  }
24
 
25
  body {
26
- font-family: 'Dank Mono', -apple-system, BlinkMacSystemFont, sans-serif;
27
  }
28
 
29
  /* 代码块容器样式 */
30
  .language-javascript, [class*="language-"] {
31
- background: #282c34 !important;
32
  border-radius: 10px !important;
33
- box-shadow: 0 10px 30px 0 rgba(0, 0, 0, .4) !important;
34
  position: relative;
35
  margin: 1.2em 0;
36
  }
37
 
 
 
 
 
 
38
  /* 代码块顶部栏 */
39
  .sticky.top-8 {
40
- background: #21252b !important;
41
  height: 40px !important;
42
  display: flex;
43
  align-items: center;
44
  border-radius: 10px 10px 0 0;
45
  padding: 0 15px !important;
46
- margin-bottom: -60px !important;
 
 
 
 
47
  }
48
 
49
  /* 语言标识 */
50
  .text-text-300 {
51
  position: absolute;
52
  left: 60px;
53
- /* top: 7px; */
54
  color: #abb2bf !important;
55
  font-size: 17px !important;
56
  font-weight: 500 !important;
57
  z-index: 11;
58
  }
59
 
 
 
 
 
60
  /* 顶部按钮样式优化 */
61
  .save-code-button, .copy-code-button, .run-code-button {
62
- background: #323842 !important;
63
- color: #abb2bf !important;
64
- border: 1px solid #3e4451 !important;
65
  font-size: 12px !important;
66
  padding: 4px 12px !important;
67
  border-radius: 4px !important;
68
  transition: all 0.2s ease-in-out !important;
69
  }
70
 
 
 
 
 
 
 
71
  .save-code-button:hover, .copy-code-button:hover {
 
 
 
 
 
72
  background: #3e4451 !important;
73
  color: #fff !important;
74
  }
@@ -78,46 +102,71 @@ body {
78
  content: " ";
79
  position: absolute;
80
  border-radius: 50%;
81
- background: #fc625d;
82
  width: 12px;
83
  height: 12px;
84
  left: 15px;
85
  top: 14px;
86
- box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
87
  z-index: 10;
88
  }
89
 
 
 
 
 
 
90
  /* 代码内容区域 */
91
  .cm-content {
92
  font-family: 'Dank Mono', -apple-system, BlinkMacSystemFont, Inter, ui-sans-serif, system-ui, 'Segoe UI', Roboto, Ubuntu, Cantarell, 'Noto Sans', sans-serif, 'Helvetica Neue', Arial, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
93
  font-size: 15px !important;
94
  line-height: 1.6em !important;
95
  padding: 20px 1.4em 1em 30px !important;
 
 
 
 
96
  color: #abb2bf !important;
97
  }
98
 
99
  /* 代码语法高亮 */
100
  .cm-line .ͼb {
101
  /* 关键字 */
 
 
 
 
102
  color: #c678dd !important;
103
  }
104
 
105
  .cm-line .ͼd {
106
  /* 数字 */
 
 
 
 
107
  color: #e5c07b !important;
108
  }
109
 
110
  .cm-line .ͼe {
111
  /* 字符串 */
 
 
 
 
112
  color: #98c379 !important;
113
  }
114
 
115
  .cm-line .ͼg {
116
  /* 变量 */
117
- color: #e06c75 !important;
118
  font-style: italic;
119
  }
120
 
 
 
 
 
121
  /* 代码语法高亮 - 扩展 */
122
  .cm-comment {
123
  /* 注释 */
@@ -129,7 +178,7 @@ body {
129
  color: #61afef !important;
130
  }
131
 
132
- .cm-tag {
133
  color: #e06c75 !important;
134
  }
135
 
@@ -146,7 +195,7 @@ body {
146
  }
147
 
148
  span.ͼc {
149
- color: #dd6b7b !important;
150
  }
151
 
152
  span.ͼl {
@@ -154,25 +203,30 @@ span.ͼl {
154
  }
155
 
156
  span.ͼt {
 
157
  color: #ddb078 !important;
158
  ;
159
  font-style: italic;
160
  }
161
 
162
  span.ͼr {
 
163
  font-style: italic;
164
  }
165
 
166
  span.ͼf {
167
- color: #80a492;
 
168
  }
169
 
170
  span.ͼm {
171
- color: #3d8e86;
 
172
  font-style: italic;
173
  }
174
 
175
  span.ͼw {
 
176
  font-style: italic;
177
  }
178
 
@@ -180,27 +234,48 @@ span.ͼw {
180
  .cm-scroller::-webkit-scrollbar {
181
  height: 10px !important;
182
  width: 10px !important;
 
 
 
 
183
  background-color: #282c34 !important;
184
  }
185
 
186
  .cm-scroller::-webkit-scrollbar-track {
187
- box-shadow: inset 0 0 6px rgba(0, 0, 0, .3) !important;
188
  border-radius: 10px !important;
 
 
 
 
 
189
  background-color: #282c34 !important;
190
  }
191
 
192
  .cm-scroller::-webkit-scrollbar-thumb {
193
  border-radius: 10px !important;
 
 
 
 
 
194
  box-shadow: inset 0 0 6px rgba(0, 0, 0, .5) !important;
195
  background-color: #3e4451 !important;
196
  }
197
 
198
  /* 行号栏样式 */
199
  .cm-gutters {
 
 
 
 
 
 
 
 
200
  background: #282c34 !important;
201
  border-right: 1px solid #3e4451 !important;
202
  color: #495162 !important;
203
- padding-right: 10px !important;
204
  }
205
 
206
  /* 当前行高亮 */
@@ -209,6 +284,10 @@ span.ͼw {
209
  }
210
 
211
  .cm-gutterElement.cm-activeLineGutter {
 
 
 
 
212
  background-color: #dd7694;
213
  }
214
 
@@ -223,9 +302,18 @@ span.ͼw {
223
 
224
  /* 选中时的文本颜色保持原样,确保可读性 */
225
  .cm-content ::selection {
 
 
 
 
226
  color: rgba(245, 177, 255, 0.9) !important;
227
  }
228
 
 
 
 
 
 
229
  /* 当有多行选中时的样式 */
230
  .cm-selectionLayer>.cm-selectionBackground {
231
  background-color: rgba(122, 129, 255, 0.2) !important;
@@ -233,7 +321,14 @@ span.ͼw {
233
 
234
  /* 代码块折叠/展开样式添加与修改 */
235
  .cm-scroller {
 
 
 
 
236
  padding-bottom: 40px;
 
 
 
237
  background-color: #282c34;
238
  }
239
 
@@ -324,7 +419,7 @@ span.ͼw {
324
  left: 0;
325
  right: 0;
326
  height: 100px;
327
- background: linear-gradient(transparent 0%, rgba(45, 45, 45, 0.3) 40%, rgba(45, 45, 45, 0.6) 80%, rgba(45, 45, 45, 0.8) 100%);
328
  pointer-events: none;
329
  opacity: 0;
330
  transition: opacity 0.3s ease;
@@ -341,4 +436,9 @@ span.ͼw {
341
  /* 只在折叠状态显示渐变遮罩 */
342
  .cm-editor#collapsed::after {
343
  opacity: 1;
 
 
 
 
 
344
  }
 
1
  @font-face {
2
  font-family: 'Dank Mono';
3
+ src: url('../assets/fonts/DankMono-Regular.woff2') format('woff2');
4
  font-display: swap;
5
  font-style: normal;
6
  }
7
 
8
  @font-face {
9
  font-family: 'Dank Mono';
10
+ src: url('../assets/fonts/DankMono-Italic.woff2') format('woff2');
11
  font-display: swap;
12
  font-style: italic;
13
  }
14
 
15
  @font-face {
16
  font-family: 'JinBuTi';
17
+ src: url('../assets/fonts/DingTalk-JinBuTi.woff2') format('woff2');
18
  font-display: swap;
19
  }
20
 
 
23
  }
24
 
25
  body {
26
+ font-family: 'JinBuTi', -apple-system, BlinkMacSystemFont, sans-serif;
27
  }
28
 
29
  /* 代码块容器样式 */
30
  .language-javascript, [class*="language-"] {
31
+ background: #f6f8fa !important;
32
  border-radius: 10px !important;
33
+ box-shadow: 0 10px 30px 0 rgba(0, 0, 0, 0.1) !important;
34
  position: relative;
35
  margin: 1.2em 0;
36
  }
37
 
38
+ .dark .language-javascript, .dark [class*="language-"] {
39
+ background: #282c34 !important;
40
+ box-shadow: 0 10px 30px 0 rgba(0, 0, 0, .4) !important;
41
+ }
42
+
43
  /* 代码块顶部栏 */
44
  .sticky.top-8 {
45
+ background: #e1e4e8 !important;
46
  height: 40px !important;
47
  display: flex;
48
  align-items: center;
49
  border-radius: 10px 10px 0 0;
50
  padding: 0 15px !important;
51
+ margin-bottom: -59px !important;
52
+ }
53
+
54
+ .dark .sticky.top-8 {
55
+ background: #21252b !important;
56
  }
57
 
58
  /* 语言标识 */
59
  .text-text-300 {
60
  position: absolute;
61
  left: 60px;
62
+ top: 2px;
63
  color: #abb2bf !important;
64
  font-size: 17px !important;
65
  font-weight: 500 !important;
66
  z-index: 11;
67
  }
68
 
69
+ .dark .text-text-300 {
70
+ color: #586069 !important;
71
+ }
72
+
73
  /* 顶部按钮样式优化 */
74
  .save-code-button, .copy-code-button, .run-code-button {
75
+ background: #f8f9fa !important;
76
+ color: #333 !important;
77
+ border: 1px solid #d1d5da !important;
78
  font-size: 12px !important;
79
  padding: 4px 12px !important;
80
  border-radius: 4px !important;
81
  transition: all 0.2s ease-in-out !important;
82
  }
83
 
84
+ .dark .save-code-button, .dark .copy-code-button, .dark .run-code-button {
85
+ background: #323842 !important;
86
+ color: #abb2bf !important;
87
+ border: 1px solid #3e4451 !important;
88
+ }
89
+
90
  .save-code-button:hover, .copy-code-button:hover {
91
+ background: #e9ecef !important;
92
+ color: #222 !important;
93
+ }
94
+
95
+ .dark .save-code-button:hover, .dark .copy-code-button:hover {
96
  background: #3e4451 !important;
97
  color: #fff !important;
98
  }
 
102
  content: " ";
103
  position: absolute;
104
  border-radius: 50%;
105
+ background: #ff5f56;
106
  width: 12px;
107
  height: 12px;
108
  left: 15px;
109
  top: 14px;
110
+ box-shadow: 20px 0 #ffbd2e, 40px 0 #27c93f;
111
  z-index: 10;
112
  }
113
 
114
+ .dakr .language-javascript::before, .dakr [class*="language-"]::before {
115
+ background: #fc625d;
116
+ box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
117
+ }
118
+
119
  /* 代码内容区域 */
120
  .cm-content {
121
  font-family: 'Dank Mono', -apple-system, BlinkMacSystemFont, Inter, ui-sans-serif, system-ui, 'Segoe UI', Roboto, Ubuntu, Cantarell, 'Noto Sans', sans-serif, 'Helvetica Neue', Arial, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
122
  font-size: 15px !important;
123
  line-height: 1.6em !important;
124
  padding: 20px 1.4em 1em 30px !important;
125
+ color: #24292e !important;
126
+ }
127
+
128
+ .dark .cm-content {
129
  color: #abb2bf !important;
130
  }
131
 
132
  /* 代码语法高亮 */
133
  .cm-line .ͼb {
134
  /* 关键字 */
135
+ color: #d73a49 !important;
136
+ }
137
+
138
+ .dark .cm-line .ͼb {
139
  color: #c678dd !important;
140
  }
141
 
142
  .cm-line .ͼd {
143
  /* 数字 */
144
+ color: #a29bfe !important;
145
+ }
146
+
147
+ .dakr .cm-line .ͼd {
148
  color: #e5c07b !important;
149
  }
150
 
151
  .cm-line .ͼe {
152
  /* 字符串 */
153
+ color: #6a89cc !important;
154
+ }
155
+
156
+ .dakr .cm-line .ͼe {
157
  color: #98c379 !important;
158
  }
159
 
160
  .cm-line .ͼg {
161
  /* 变量 */
162
+ color: #2ca9e1 !important;
163
  font-style: italic;
164
  }
165
 
166
+ .dakr .cm-line .ͼg {
167
+ color: #e3adb9 !important;
168
+ }
169
+
170
  /* 代码语法高亮 - 扩展 */
171
  .cm-comment {
172
  /* 注释 */
 
178
  color: #61afef !important;
179
  }
180
 
181
+ cm-tag {
182
  color: #e06c75 !important;
183
  }
184
 
 
195
  }
196
 
197
  span.ͼc {
198
+ color: #7d5fff !important;
199
  }
200
 
201
  span.ͼl {
 
203
  }
204
 
205
  span.ͼt {
206
+ /* 暗色模式下的逗号 */
207
  color: #ddb078 !important;
208
  ;
209
  font-style: italic;
210
  }
211
 
212
  span.ͼr {
213
+ /* 暗色模式下的函数名 */
214
  font-style: italic;
215
  }
216
 
217
  span.ͼf {
218
+ /* 亮色模式下奇怪的符号 */
219
+ color: #70a1ff;
220
  }
221
 
222
  span.ͼm {
223
+ /* 亮色模式下的注释 */
224
+ color: #f29a76;
225
  font-style: italic;
226
  }
227
 
228
  span.ͼw {
229
+ /* 暗色模式下的注释 */
230
  font-style: italic;
231
  }
232
 
 
234
  .cm-scroller::-webkit-scrollbar {
235
  height: 10px !important;
236
  width: 10px !important;
237
+ background-color: #f6f8fa !important;
238
+ }
239
+
240
+ .dark .cm-scroller::-webkit-scrollbar {
241
  background-color: #282c34 !important;
242
  }
243
 
244
  .cm-scroller::-webkit-scrollbar-track {
245
+ box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.1) !important;
246
  border-radius: 10px !important;
247
+ background-color: #f6f8fa !important;
248
+ }
249
+
250
+ .dark .cm-scroller::-webkit-scrollbar-track {
251
+ box-shadow: inset 0 0 6px rgba(0, 0, 0, .3) !important;
252
  background-color: #282c34 !important;
253
  }
254
 
255
  .cm-scroller::-webkit-scrollbar-thumb {
256
  border-radius: 10px !important;
257
+ box-shadow: inset 0 0 6px rgba(0, 0, 0, .2) !important;
258
+ background-color: #d1d5da !important;
259
+ }
260
+
261
+ .dark .cm-scroller::-webkit-scrollbar-thumb {
262
  box-shadow: inset 0 0 6px rgba(0, 0, 0, .5) !important;
263
  background-color: #3e4451 !important;
264
  }
265
 
266
  /* 行号栏样式 */
267
  .cm-gutters {
268
+ background: #f6f8fa !important;
269
+ border-right: 1px solid #d1d5da !important;
270
+ color: #586069 !important;
271
+ padding-right: 10px !important;
272
+ font-family: "Dank Mono";
273
+ }
274
+
275
+ .dark .cm-gutters {
276
  background: #282c34 !important;
277
  border-right: 1px solid #3e4451 !important;
278
  color: #495162 !important;
 
279
  }
280
 
281
  /* 当前行高亮 */
 
284
  }
285
 
286
  .cm-gutterElement.cm-activeLineGutter {
287
+ background-color: #f9d3e3;
288
+ }
289
+
290
+ .dark .cm-gutterElement.cm-activeLineGutter {
291
  background-color: #dd7694;
292
  }
293
 
 
302
 
303
  /* 选中时的文本颜色保持原样,确保可读性 */
304
  .cm-content ::selection {
305
+ color: rgba(62, 158, 111, 0.9) !important;
306
+ }
307
+
308
+ .dark .cm-content ::selection {
309
  color: rgba(245, 177, 255, 0.9) !important;
310
  }
311
 
312
+ /* 匹配相同结果时的颜色 */
313
+ .cm-selectionMatch {
314
+ background-color: #9c88ff5a !important;
315
+ }
316
+
317
  /* 当有多行选中时的样式 */
318
  .cm-selectionLayer>.cm-selectionBackground {
319
  background-color: rgba(122, 129, 255, 0.2) !important;
 
321
 
322
  /* 代码块折叠/展开样式添加与修改 */
323
  .cm-scroller {
324
+ background-color: #f6f8fa;
325
+ }
326
+
327
+ #collapsed>.cm-scroller, #expanded>.cm-scroller {
328
  padding-bottom: 40px;
329
+ }
330
+
331
+ .dark .cm-scroller {
332
  background-color: #282c34;
333
  }
334
 
 
419
  left: 0;
420
  right: 0;
421
  height: 100px;
422
+ background: linear-gradient(transparent 0%, rgba(255, 255, 255, 0.3) 40%, rgba(255, 255, 255, 0.6) 80%, rgba(255, 255, 255, 0.8) 100%);
423
  pointer-events: none;
424
  opacity: 0;
425
  transition: opacity 0.3s ease;
 
436
  /* 只在折叠状态显示渐变遮罩 */
437
  .cm-editor#collapsed::after {
438
  opacity: 1;
439
+ }
440
+
441
+ /* 隐藏原始的折叠按钮 */
442
+ button.flex.gap-1.items-center:not(.run-code-button) {
443
+ display: none;
444
  }