Skip to content

Commit e79d5bc

Browse files
committed
feat: code by Trae
1 parent 905be8b commit e79d5bc

1 file changed

Lines changed: 95 additions & 0 deletions

File tree

epub_browser/assets/chapter.css

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,6 +1027,101 @@ body {
10271027
/* 代码块 */
10281028
.dark-mode #eb-content pre code {
10291029
background: var(--bg-color) !important;
1030+
color: var(--content-text) !important;
1031+
}
1032+
1033+
.dark-mode #eb-content pre {
1034+
background: var(--border-color) !important;
1035+
}
1036+
1037+
/* 代码高亮主题覆盖 */
1038+
.dark-mode .hljs {
1039+
background: var(--bg-color) !important;
1040+
color: var(--content-text) !important;
1041+
}
1042+
1043+
.dark-mode .hljs-comment,
1044+
.dark-mode .hljs-quote {
1045+
color: var(--text-secondary) !important;
1046+
}
1047+
1048+
.dark-mode .hljs-keyword,
1049+
.dark-mode .hljs-selector-tag,
1050+
.dark-mode .hljs-literal,
1051+
.dark-mode .hljs-section,
1052+
.dark-mode .hljs-link {
1053+
color: var(--primary) !important;
1054+
}
1055+
1056+
.dark-mode .hljs-string,
1057+
.dark-mode .hljs-title,
1058+
.dark-mode .hljs-name,
1059+
.dark-mode .hljs-type,
1060+
.dark-mode .hljs-attribute,
1061+
.dark-mode .hljs-symbol,
1062+
.dark-mode .hljs-bullet,
1063+
.dark-mode .hljs-built_in,
1064+
.dark-mode .hljs-addition,
1065+
.dark-mode .hljs-variable,
1066+
.dark-mode .hljs-template-tag,
1067+
.dark-mode .hljs-template-variable {
1068+
color: var(--content-text) !important;
1069+
}
1070+
1071+
.dark-mode .hljs-number,
1072+
.dark-mode .hljs-regexp,
1073+
.dark-mode .hljs-literal {
1074+
color: var(--success) !important;
1075+
}
1076+
1077+
.dark-mode .hljs-deletion,
1078+
.dark-mode .hljs-meta {
1079+
color: #ff6b6b !important;
1080+
}
1081+
1082+
/* 日间模式代码高亮覆盖 */
1083+
:not(.dark-mode) .hljs {
1084+
background: var(--bg-color) !important;
1085+
color: var(--content-text) !important;
1086+
}
1087+
1088+
:not(.dark-mode) .hljs-comment,
1089+
:not(.dark-mode) .hljs-quote {
1090+
color: var(--text-secondary) !important;
1091+
}
1092+
1093+
:not(.dark-mode) .hljs-keyword,
1094+
:not(.dark-mode) .hljs-selector-tag,
1095+
:not(.dark-mode) .hljs-literal,
1096+
:not(.dark-mode) .hljs-section,
1097+
:not(.dark-mode) .hljs-link {
1098+
color: var(--primary) !important;
1099+
}
1100+
1101+
:not(.dark-mode) .hljs-string,
1102+
:not(.dark-mode) .hljs-title,
1103+
:not(.dark-mode) .hljs-name,
1104+
:not(.dark-mode) .hljs-type,
1105+
:not(.dark-mode) .hljs-attribute,
1106+
:not(.dark-mode) .hljs-symbol,
1107+
:not(.dark-mode) .hljs-bullet,
1108+
:not(.dark-mode) .hljs-built_in,
1109+
:not(.dark-mode) .hljs-addition,
1110+
:not(.dark-mode) .hljs-variable,
1111+
:not(.dark-mode) .hljs-template-tag,
1112+
:not(.dark-mode) .hljs-template-variable {
1113+
color: var(--content-text) !important;
1114+
}
1115+
1116+
:not(.dark-mode) .hljs-number,
1117+
:not(.dark-mode) .hljs-regexp,
1118+
:not(.dark-mode) .hljs-literal {
1119+
color: var(--success) !important;
1120+
}
1121+
1122+
:not(.dark-mode) .hljs-deletion,
1123+
:not(.dark-mode) .hljs-meta {
1124+
color: #ff6b6b !important;
10301125
}
10311126

10321127
/* 表格 */

0 commit comments

Comments
 (0)