@bytechain.cn/colamd-themes 0.3.1 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/.claude/skills/colamd-themes-preview.skill.md +333 -0
  2. package/.claude/skills/colamd-themes.skill.md +10 -0
  3. package/.dsh/skills/colamd-themes/SKILL.md +14 -0
  4. package/.github/supported-topics.yml +17 -0
  5. package/.hermes/skills/tools/colamd-themes/SKILL.md +14 -0
  6. package/.openclaw/skills/colamd-themes/SKILL.md +1 -146
  7. package/.opencode/skills/colamd-themes/SKILL.md +17 -0
  8. package/.trae/rules/colamd-themes.md +0 -145
  9. package/CHANGELOG.md +318 -240
  10. package/DSH_SUPPORT_SUMMARY.md +87 -0
  11. package/README.md +414 -384
  12. package/README_CN.md +412 -384
  13. package/RELEASENOTE.md +541 -365
  14. package/bytechain.cn-colamd-themes-0.5.0.tgz +0 -0
  15. package/dist/cli.js +272 -32
  16. package/dist/cli.js.map +1 -1
  17. package/dist/color-utils.d.ts +1 -0
  18. package/dist/color-utils.js +25 -6
  19. package/dist/color-utils.js.map +1 -1
  20. package/dist/extractors/pdf-extractor.js +6 -1
  21. package/dist/extractors/pdf-extractor.js.map +1 -1
  22. package/dist/extractors/url-extractor.d.ts +0 -4
  23. package/dist/extractors/url-extractor.js +13 -126
  24. package/dist/extractors/url-extractor.js.map +1 -1
  25. package/dist/generator.d.ts +1 -1
  26. package/dist/generator.js +32 -11
  27. package/dist/generator.js.map +1 -1
  28. package/dist/models.d.ts +5 -4
  29. package/dist/models.js +2 -3
  30. package/dist/models.js.map +1 -1
  31. package/dist/renderer.d.ts +4 -2
  32. package/dist/renderer.js +68 -25
  33. package/dist/renderer.js.map +1 -1
  34. package/dist/templates/template.css +220 -498
  35. package/dist/templates/theme-paradigm.md +530 -658
  36. package/dist/templates/theme-template.hbs +256 -370
  37. package/dist/theme-store.js +19 -3
  38. package/dist/theme-store.js.map +1 -1
  39. package/dist/utils/document-paradigm.d.ts +12 -0
  40. package/dist/utils/document-paradigm.js +109 -0
  41. package/dist/utils/document-paradigm.js.map +1 -0
  42. package/dist/validators.d.ts +4 -1
  43. package/dist/validators.js +115 -1
  44. package/dist/validators.js.map +1 -1
  45. package/mcp-server/dist/index.d.ts +13 -0
  46. package/mcp-server/dist/index.d.ts.map +1 -0
  47. package/mcp-server/dist/index.js +0 -0
  48. package/mcp-server/dist/index.js.map +1 -0
  49. package/mcp-server/package-lock.json +1759 -0
  50. package/mcp-server/package.json +24 -0
  51. package/mcp-server/src/index.ts +0 -0
  52. package/mcp-server/tsconfig.json +19 -0
  53. package/package.json +54 -36
  54. package/skills/build-skills.sh +30 -5
  55. package/skills/colamd-themes/SKILL.md +180 -148
  56. package/src/cli.ts +474 -217
  57. package/src/color-systems.ts +289 -289
  58. package/src/color-utils.ts +137 -120
  59. package/src/contrast.ts +66 -66
  60. package/src/docx-style-paradigm.ts +811 -811
  61. package/src/export-cli.ts +356 -356
  62. package/src/extractors/base.ts +8 -8
  63. package/src/extractors/docx-extractor.ts +417 -417
  64. package/src/extractors/pdf-extractor.ts +533 -527
  65. package/src/extractors/url-extractor.ts +846 -981
  66. package/src/generator.ts +197 -169
  67. package/src/index.ts +29 -29
  68. package/src/models.ts +212 -212
  69. package/src/renderer.ts +332 -288
  70. package/src/templates/template.css +220 -498
  71. package/src/templates/theme-paradigm.md +530 -658
  72. package/src/templates/theme-template.hbs +256 -370
  73. package/src/theme-store.ts +185 -170
  74. package/src/types/pdf-parse.d.ts +12 -12
  75. package/src/utils/cli-utils.ts +84 -84
  76. package/src/utils/document-paradigm.ts +118 -0
  77. package/src/validators.ts +298 -176
  78. package/themes/academic-paper-pt.css +353 -1805
  79. package/themes/academic-paper.css +350 -1099
  80. package/themes/academic-style.css +342 -2430
  81. package/themes/colly.css +256 -370
  82. package/themes/elegant.css +288 -671
  83. package/themes/forest-ink.css +240 -664
  84. package/themes/guizang.css +250 -732
  85. package/themes/hermes-security.css +279 -0
  86. package/themes/meeting-minutes.css +256 -370
  87. package/themes/pixso-design.css +278 -1261
  88. package/themes/salvator-blog.css +256 -370
  89. package/themes/shimo-theme.css +256 -0
  90. package/themes/swiss-design.css +285 -746
  91. package/themes/template.css +220 -498
  92. package/themes/trae-blue.css +280 -737
  93. package/themes/word-contract.css +249 -0
  94. package/themes-preview/demo-content.md +187 -187
  95. package/tsconfig.json +18 -18
  96. package/src/mermaid-presets.ts +0 -142
  97. package/themes/swiss-design copy.css +0 -746
  98. package/themes-preview/colly-preview.html +0 -623
  99. package/themes-preview/meeting-minutes-preview.html +0 -625
  100. package/themes-preview/salvator-blog-preview.html +0 -623
@@ -1,671 +1,288 @@
1
- /*
2
- * ColaMD 主题:Elegant (典雅暖调)
3
- * 配色:暖米色底 + 朱砂红点缀
4
- * 兼容:ColaMD (body.theme-custom) / Typora
5
- * 导入:Theme > Import Theme
6
- */
7
-
8
- /* ── 1. 根变量 & 主题变量 ── */
9
- :root {
10
- --side-bar-bg-color: #e8e4df;
11
- --control-text-color: #555;
12
- --active-file-bg-color: #ddd8d2;
13
- --active-file-text-color: #1a1a1a;
14
- --active-file-border-color: #c44b2b;
15
- --bg-color: #f0edea;
16
- --text-color: #2c2c2c;
17
- --select-text-bg-color: rgba(196, 75, 43, 0.2);
18
- --select-text-font-color: #1a1a1a;
19
- --rawblock-edit-panel-bd: #d8d3ce;
20
- }
21
-
22
- body.theme-custom {
23
- --bg-color: #f0edea;
24
- --text-color: #2c2c2c;
25
- --heading-color: #1a1a1a;
26
- --border-color: #d8d3ce;
27
- --code-bg: #e8e4df;
28
- --code-color: #c44b2b;
29
- --code-block-bg: #2c2c2c;
30
- --code-block-text: #e0dcd7;
31
- --code-block-color: #e0dcd7;
32
- --blockquote-bg: #eae6e1;
33
- --blockquote-border: #c44b2b;
34
- --link-color: #c44b2b;
35
- --accent-color: #c44b2b;
36
- --accent-dark: #a33d22;
37
- --accent-light: #d8d3ce;
38
- --surface-color: #eae6e1;
39
- --surface-alt: #f7f5f2;
40
- --text-muted: #555;
41
- --text-dim: #777;
42
- --selection-bg: rgba(196, 75, 43, 0.2);
43
- --table-header-bg: #eae6e1;
44
- --table-stripe: rgba(196, 75, 43, 0.04);
45
- --scrollbar-thumb: #ccc8c2;
46
- --scrollbar-thumb-hover: #b5b0aa;
47
- --hr-color: #d8d3ce;
48
- --mermaid-font-family: "LXGW WenKai", "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia, serif;
49
- --mermaid-font-size: 12px;
50
- --mermaid-dark-mode: false;
51
- --mermaid-background: #f7f5f2;
52
- --mermaid-primary-color: #eae6e1;
53
- --mermaid-primary-border-color: #c44b2b;
54
- --mermaid-primary-text-color: #2c2c2c;
55
- --mermaid-secondary-color: #e8e4df;
56
- --mermaid-secondary-border-color: #d8d3ce;
57
- --mermaid-secondary-text-color: #2c2c2c;
58
- --mermaid-tertiary-color: #f0edea;
59
- --mermaid-tertiary-border-color: #d8d3ce;
60
- --mermaid-tertiary-text-color: #555;
61
- --mermaid-line-color: #999;
62
- --mermaid-text-color: #2c2c2c;
63
- --mermaid-main-bkg: #eae6e1;
64
- --mermaid-second-bkg: #f7f5f2;
65
- --mermaid-main-contrast-color: #c44b2b;
66
- --mermaid-label-background: #f0edea;
67
- --mermaid-label-text-color: #2c2c2c;
68
- --mermaid-node-border: #c44b2b;
69
- --mermaid-node-bkg: #eae6e1;
70
- --mermaid-cluster-bkg: rgba(196, 75, 43, 0.04);
71
- --mermaid-cluster-border: #c44b2b;
72
- --mermaid-default-link-color: #999;
73
- --mermaid-edge-label-background: #f0edea;
74
- --mermaid-arrowhead-color: #999;
75
- --mermaid-person-border: #2c2c2c;
76
- --mermaid-person-bkg: #eae6e1;
77
- --mermaid-label-offset-y: 0px;
78
- }
79
-
80
- pre { --select-text-bg-color: #36284e; --select-text-font-color: #fff; }
81
-
82
- /* ── 2. 全局 ── */
83
- html { font-size: 16px; -webkit-font-smoothing: antialiased; }
84
- body.theme-custom, html, body {
85
- background-color: #f0edea;
86
- color: #2c2c2c;
87
- font-family: "LXGW WenKai", "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia, "Times New Roman", serif;
88
- line-height: 1.9;
89
- }
90
- body.theme-custom { -webkit-font-smoothing: antialiased; }
91
- #write { max-width: 820px; margin: 0 auto; padding: 30px 60px 100px; }
92
- #write > ul:first-child, #write > ol:first-child { margin-top: 30px; }
93
-
94
- @media only screen and (min-width:1400px) { #write { max-width: 920px; } }
95
- @media only screen and (max-width:768px) { #write { padding: 20px 20px 60px; } }
96
-
97
- /* ── 3. 标题 ── */
98
- h1, h2, h3, h4, h5, h6,
99
- body.theme-custom h1, body.theme-custom h2, body.theme-custom h3,
100
- body.theme-custom h4, body.theme-custom h5, body.theme-custom h6 {
101
- position: relative;
102
- color: #1a1a1a;
103
- font-weight: 700;
104
- line-height: 1.4;
105
- margin-top: 1.8em;
106
- margin-bottom: 0.6em;
107
- }
108
- h1, body.theme-custom h1 { font-size: 1.8em; padding-bottom: 0.3em; cursor: text; }
109
- h2, body.theme-custom h2 { font-size: 1.5em; padding-bottom: 0.2em; cursor: text; }
110
- h3, body.theme-custom h3 { font-size: 1.25em; cursor: text; }
111
- h4, body.theme-custom h4 { font-size: 1.1em; cursor: text; }
112
- h5, body.theme-custom h5 { font-size: 1em; cursor: text; }
113
- h6, body.theme-custom h6 { font-size: 0.95em; color: #555; cursor: text; }
114
-
115
- h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor,
116
- h4:hover a.anchor, h5:hover a.anchor, h6:hover a.anchor { text-decoration: none; }
117
-
118
- /* ── 4. 内联元素 ── */
119
- p { margin: 0.8em 0; line-height: 1.9; text-align: justify; }
120
-
121
- strong, body.theme-custom strong { color: #c44b2b; font-weight: 700; }
122
- em, body.theme-custom em { font-style: italic; color: #444; }
123
- em strong, strong em, body.theme-custom em strong, body.theme-custom strong em { color: #c44b2b; }
124
-
125
- a, body.theme-custom a { color: #c44b2b; text-decoration: none; }
126
- a:hover, body.theme-custom a:hover { text-decoration: underline; }
127
-
128
- u, body.theme-custom u {
129
- text-decoration: none;
130
- border-bottom: 2px solid #c44b2b;
131
- padding-bottom: 1px;
132
- }
133
-
134
- mark, body.theme-custom mark {
135
- background: rgba(196, 75, 43, 0.15);
136
- color: #2c2c2c;
137
- padding: 1px 4px;
138
- border-radius: 2px;
139
- }
140
-
141
- del, s { color: #999; }
142
-
143
- /* ── 5. 引用块 ── */
144
- blockquote, body.theme-custom blockquote {
145
- margin: 1.5em 0;
146
- padding: 15px 20px 15px 25px;
147
- border-left: 4px solid #c44b2b;
148
- background: #eae6e1;
149
- color: #444;
150
- }
151
- blockquote p, body.theme-custom blockquote p { margin: 0.5em 0; }
152
-
153
- /* ── 6. 分割线 ── */
154
- hr, body.theme-custom hr { border: none; border-top: 1px solid #d8d3ce; margin: 2.5em 0; height: 0; }
155
-
156
- /* ── 7. 列表 ── */
157
- ul, ol, body.theme-custom ul, body.theme-custom ol { padding-left: 1.8em; margin: 0.8em 0; }
158
- li, body.theme-custom li { margin: 0.35em 0; line-height: 1.8; }
159
- ul li { list-style-type: disc; list-style-position: outside; }
160
- ol li { list-style-type: decimal; list-style-position: outside; }
161
- .md-task-list-item > input { margin-left: -1.3em; margin-top: 0.3em; }
162
-
163
- /* ── 8. 内联代码 ── */
164
- code, tt,
165
- body.theme-custom code, body.theme-custom tt {
166
- font-family: "JetBrains Mono", "Fira Code", "SF Mono", Menlo, Consolas, monospace;
167
- font-size: 0.9em;
168
- padding: 2px 6px;
169
- margin: 0 2px;
170
- background: #e8e4df;
171
- border-radius: 3px;
172
- color: #c44b2b;
173
- }
174
-
175
- /* ── 9. 代码块 ── */
176
- pre.md-fences {
177
- font-family: "JetBrains Mono", "Fira Code", "SF Mono", Menlo, Consolas, monospace;
178
- font-size: 0.88em;
179
- line-height: 1.6;
180
- background: #2c2c2c;
181
- color: #e0dcd7;
182
- padding: 18px 22px;
183
- border-radius: 6px;
184
- margin: 1.5em 0;
185
- overflow-x: auto;
186
- }
187
- pre.md-fences code { background: transparent; color: inherit; padding: 0; margin: 0; border-radius: 0; }
188
-
189
- body.theme-custom #editor .ProseMirror pre {
190
- font-family: "JetBrains Mono", "Fira Code", "SF Mono", Menlo, Consolas, monospace;
191
- font-size: 0.88em;
192
- line-height: 1.6;
193
- background: #2c2c2c !important;
194
- color: #e0dcd7 !important;
195
- padding: 18px 22px;
196
- border-radius: 6px;
197
- margin: 1.5em 0;
198
- overflow-x: auto;
199
- }
200
- body.theme-custom #editor .ProseMirror pre code {
201
- background: transparent !important;
202
- color: #e0dcd7 !important;
203
- padding: 0; margin: 0; border-radius: 0;
204
- }
205
-
206
- /* ── 10. 代码语法高亮 ── */
207
- .cm-s-inner { font-family: "JetBrains Mono", "Fira Code", "SF Mono", monospace; font-size: 0.9em; line-height: 1.6; }
208
-
209
- /* 注释 / 引用 / 分隔线 */
210
- body.theme-custom .token.comment, body.theme-custom .token.prolog,
211
- body.theme-custom .token.doctype, body.theme-custom .token.cdata,
212
- .cm-s-inner .cm-comment, .cm-s-inner .cm-quote, .cm-s-inner .cm-hr { color: #8a857e; font-style: italic; }
213
-
214
- /* 标点 / 元数据 */
215
- body.theme-custom .token.punctuation, .cm-s-inner .cm-meta { color: #c4bfb8; }
216
-
217
- /* 关键字 (粗体) */
218
- body.theme-custom .token.keyword, body.theme-custom .token.important,
219
- .cm-s-inner .cm-keyword { color: #c44b2b; font-weight: 700; }
220
-
221
- /* 布尔 / 内建 / 标签 / 选择器 / 常量 / 删除 / 原子 / 错误 */
222
- body.theme-custom .token.boolean, body.theme-custom .token.builtin,
223
- body.theme-custom .token.tag, body.theme-custom .token.selector,
224
- body.theme-custom .token.constant, body.theme-custom .token.deleted,
225
- .cm-s-inner .cm-atom, .cm-s-inner .cm-builtin,
226
- .cm-s-inner .cm-tag, .cm-s-inner .cm-error { color: #c44b2b; }
227
-
228
- /* 字符串 / 属性值 / 符号 / 插入 */
229
- body.theme-custom .token.string, body.theme-custom .token.attr-value,
230
- body.theme-custom .token.symbol, body.theme-custom .token.inserted,
231
- .cm-s-inner .cm-string { color: #8fa88a; }
232
-
233
- /* 数字 */
234
- body.theme-custom .token.number, .cm-s-inner .cm-number { color: #c9a35a; }
235
-
236
- /* 函数 / 类名 / 变量 / 属性名 / 实体 / 定义 */
237
- body.theme-custom .token.function, body.theme-custom .token.class-name,
238
- body.theme-custom .token.variable, body.theme-custom .token.attr-name,
239
- body.theme-custom .token.property, body.theme-custom .token.entity,
240
- .cm-s-inner .cm-def, .cm-s-inner .cm-variable-2,
241
- .cm-s-inner .cm-attribute, .cm-s-inner .cm-property,
242
- .cm-s-inner .cm-header { color: #d4a76a; }
243
-
244
- .cm-s-inner .cm-header { font-weight: 700; }
245
- body.theme-custom .token.url, .cm-s-inner .cm-link { color: #d4a76a; text-decoration: underline; }
246
-
247
- /* 运算符 */
248
- body.theme-custom .token.operator, .cm-s-inner .cm-operator { color: #b5afa8; }
249
-
250
- /* 正则 / 代码文本色 */
251
- body.theme-custom .token.regex { color: #c99a5e; }
252
- .cm-s-inner .cm-variable { color: #e0dcd7; }
253
-
254
- /* ── 11. 表格 ── */
255
- table, body.theme-custom table {
256
- width: 100%;
257
- border-collapse: collapse;
258
- margin: 1.5em 0;
259
- font-size: 0.95em;
260
- }
261
- table th, body.theme-custom table th {
262
- background: #eae6e1;
263
- font-weight: 700;
264
- color: #1a1a1a;
265
- padding: 10px 14px;
266
- border-bottom: 2px solid #c44b2b;
267
- text-align: left;
268
- }
269
- table td, body.theme-custom table td {
270
- padding: 10px 14px;
271
- border-bottom: 1px solid #d8d3ce;
272
- }
273
- table tr:hover td, body.theme-custom table tr:hover td {
274
- background: rgba(196, 75, 43, 0.04);
275
- }
276
-
277
- /* ── 12. 图片 ── */
278
- img, body.theme-custom img { max-width: 100%; }
279
- p > img:only-child, body.theme-custom p > img:only-child { display: block; margin: 1.5em auto; }
280
- body.theme-custom figure { margin: 1.5em 0; text-align: center; }
281
- body.theme-custom figcaption { font-size: 0.9em; color: var(--text-muted); margin-top: 0.6em; }
282
-
283
- /* ── 13. 数学公式 ── */
284
-
285
- /* ColaMD */
286
- body.theme-custom .math-block {
287
- background: #eae6e1;
288
- padding: 16px 0;
289
- margin: 1.5em 0;
290
- border-radius: 6px;
291
- border: 1px solid #d8d3ce;
292
- text-align: center;
293
- overflow-x: auto;
294
- }
295
- body.theme-custom .math-block .katex,
296
- body.theme-custom .math-block .katex-display,
297
- body.theme-custom .math-block .MathJax,
298
- body.theme-custom .math-block .katex *,
299
- body.theme-custom .math-block .MathJax *,
300
- body.theme-custom .math-block .katex .mord,
301
- body.theme-custom .math-block .katex .mbin,
302
- body.theme-custom .math-block .katex .mrel,
303
- body.theme-custom .math-block .katex .mopen,
304
- body.theme-custom .math-block .katex .mclose,
305
- body.theme-custom .math-block .katex .mpunct,
306
- body.theme-custom .math-block .katex .minner { color: #2c2c2c !important; }
307
-
308
- /* Typora */
309
- .md-math-block, .MathJax_Display { margin: 1.5em 0 !important; text-align: center; }
310
- .md-inline-math, .md-inline-math script, .md-math-inline, .MathJax { color: #2c2c2c; }
311
- .MathJax svg, .MathJax_Display svg { fill: currentColor; stroke: currentColor; }
312
-
313
- /* ── 14. Mermaid ── */
314
-
315
- /* 容器 — 只在外层加边框,避免内外双重边框 */
316
- .md-diagram-panel { margin: 1.5em 0; }
317
- .md-diagram-panel.md-mermaid,
318
- body.theme-custom .mermaid-block {
319
- background: #f7f5f2;
320
- border: 1px solid #d8d3ce;
321
- border-radius: 6px;
322
- padding: 20px;
323
- margin: 1.5em 0;
324
- }
325
- body.theme-custom .mermaid-preview {
326
- background: #f7f5f2;
327
- border: none;
328
- border-radius: 0;
329
- padding: 0;
330
- margin: 0;
331
- }
332
- .md-diagram-panel.md-mermaid svg,
333
- body.theme-custom .mermaid-preview svg { max-width: 100%; height: auto; }
334
-
335
- /* 全局字体 */
336
- .md-diagram-panel.md-mermaid svg text,
337
- body.theme-custom .mermaid-preview svg text {
338
- fill: #2c2c2c;
339
- font-family: "LXGW WenKai", "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia, serif;
340
- }
341
- body.theme-custom .mermaid-preview svg .nodeLabel span,
342
- body.theme-custom .mermaid-preview svg .edgeLabel span {
343
- font-family: "LXGW WenKai", "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia, serif;
344
- }
345
- body.theme-custom .mermaid-preview svg foreignObject span {
346
- color: #2c2c2c !important;
347
- font-family: "LXGW WenKai", "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia, serif !important;
348
- font-size: 14px !important;
349
- }
350
- .md-diagram-panel.md-mermaid .node .label {
351
- color: #2c2c2c !important;
352
- font-family: "LXGW WenKai", "Noto Serif SC", Georgia, serif !important;
353
- }
354
-
355
- /* 通用节点 & 连线 (ColaMD) */
356
- body.theme-custom .mermaid-preview svg .node rect,
357
- body.theme-custom .mermaid-preview svg .node circle,
358
- body.theme-custom .mermaid-preview svg .node ellipse,
359
- body.theme-custom .mermaid-preview svg .node polygon,
360
- body.theme-custom .mermaid-preview svg .node path {
361
- stroke: #c44b2b;
362
- fill: #eae6e1 !important;
363
- }
364
- body.theme-custom .mermaid-preview svg .edgePath .path { stroke: #999; }
365
- body.theme-custom .mermaid-preview svg .cluster rect,
366
- body.theme-custom .mermaid-preview svg .cluster path { stroke: #c44b2b; }
367
- body.theme-custom .mermaid-preview svg defs marker path { fill: #999; stroke: #999; }
368
-
369
- /* 通用节点 & 连线 (Typora) */
370
- .md-diagram-panel.md-mermaid .node rect,
371
- .md-diagram-panel.md-mermaid .node circle,
372
- .md-diagram-panel.md-mermaid .node ellipse,
373
- .md-diagram-panel.md-mermaid .node polygon {
374
- fill: #eae6e1 !important;
375
- stroke: #c44b2b !important;
376
- stroke-width: 1.5px !important;
377
- }
378
- .md-diagram-panel.md-mermaid .edgePath .path {
379
- stroke: #999 !important;
380
- stroke-width: 1.5px !important;
381
- }
382
- .md-diagram-panel.md-mermaid .edgeLabel {
383
- background-color: #f7f5f2 !important;
384
- color: #555 !important;
385
- }
386
- .md-diagram-panel.md-mermaid .cluster rect {
387
- fill: rgba(196, 75, 43, 0.06) !important;
388
- stroke: #c44b2b !important;
389
- stroke-width: 1px !important;
390
- stroke-dasharray: 4,4;
391
- }
392
-
393
- /* 硬编码色值覆盖 */
394
- body.theme-custom .mermaid-preview svg rect[stroke="#444444"],
395
- body.theme-custom .mermaid-preview svg path[stroke="#444444"],
396
- body.theme-custom .mermaid-preview svg line[stroke="#444444"],
397
- body.theme-custom .mermaid-preview svg rect[stroke="#000000"],
398
- body.theme-custom .mermaid-preview svg path[stroke="#000000"],
399
- body.theme-custom .mermaid-preview svg line[stroke="#000000"] { stroke: #c44b2b !important; }
400
-
401
- /* 标签 & 文本 (ColaMD) */
402
- body.theme-custom .mermaid-preview svg .label text,
403
- body.theme-custom .mermaid-preview svg .nodeLabel text { fill: #2c2c2c !important; }
404
- body.theme-custom .mermaid-preview svg .nodeLabel span { color: #2c2c2c !important; }
405
- body.theme-custom .mermaid-preview svg .edgeLabel text { fill: #2c2c2c !important; }
406
- body.theme-custom .mermaid-preview svg .edgeLabel rect { fill: #4f4d4b !important; }
407
- body.theme-custom .mermaid-preview svg .edgeLabel span { color: #2c2c2c !important; }
408
-
409
- /* 文本偏移 */
410
- body.theme-custom .mermaid-preview svg .label text,
411
- body.theme-custom .mermaid-preview svg .nodeLabel text { transform: translateY(0) !important; }
412
- body.theme-custom .mermaid-preview svg .titleText { transform: translateY(0) !important; }
413
- body.theme-custom .mermaid-preview svg .xychart .axis text { transform: translateY(0) !important; }
414
- body.theme-custom .mermaid-preview svg .nodeLabel,
415
- body.theme-custom .mermaid-preview svg .edgeLabel {
416
- display: block !important;
417
- position: relative !important;
418
- top: -3px !important;
419
- }
420
-
421
- /* 状态图 */
422
- body.theme-custom .mermaid-preview svg .statediagram-state rect,
423
- body.theme-custom .mermaid-preview svg .statediagram-state circle { stroke: #c44b2b; }
424
- body.theme-custom .mermaid-preview svg .statediagram-state .nodeLabel text,
425
- body.theme-custom .mermaid-preview svg .statediagram-state .nodeLabel span,
426
- body.theme-custom .mermaid-preview svg .statediagram-cluster .outer-title text,
427
- body.theme-custom .mermaid-preview svg .edgeLabel .label text { fill: #2c2c2c !important; color: #2c2c2c !important; }
428
- body.theme-custom .mermaid-preview svg .statediagram-cluster rect { stroke: #c44b2b; }
429
- body.theme-custom .mermaid-preview svg .transition { stroke: #999; }
430
-
431
- /* 饼图 */
432
- body.theme-custom .mermaid-preview svg .pieCircle,
433
- body.theme-custom .mermaid-preview svg .slice { stroke: #c44b2b; }
434
- body.theme-custom .mermaid-preview svg .pieTitleText,
435
- body.theme-custom .mermaid-preview svg .legend text { fill: #2c2c2c !important; }
436
-
437
- /* 四象限图 */
438
- body.theme-custom .mermaid-preview svg .quadrant rect { stroke: #c44b2b; }
439
- body.theme-custom .mermaid-preview svg .quadrant text,
440
- body.theme-custom .mermaid-preview svg .quadrant .titleText { fill: #2c2c2c !important; }
441
- body.theme-custom .mermaid-preview svg .quadrant .axis text { fill: #777 !important; }
442
- body.theme-custom .mermaid-preview svg .quadrant .axis line,
443
- body.theme-custom .mermaid-preview svg .quadrant .axis path { stroke: #999; }
444
- body.theme-custom .mermaid-preview svg .quadrant .point { fill: #c44b2b; stroke: #c44b2b; }
445
-
446
- /* XY Chart */
447
- body.theme-custom .mermaid-preview svg .xychart .axis text { fill: #777 !important; }
448
- body.theme-custom .mermaid-preview svg .xychart .axis line,
449
- body.theme-custom .mermaid-preview svg .xychart .axis path { stroke: #999; }
450
- body.theme-custom .mermaid-preview svg .xychart .plot rect { stroke: #c44b2b; }
451
- body.theme-custom .mermaid-preview svg .xychart .plot line { stroke: #d8d3ce; }
452
- body.theme-custom .mermaid-preview svg .xychart .titleText { fill: #2c2c2c !important; }
453
-
454
- /* Sankey */
455
- body.theme-custom .mermaid-preview svg .sankey .link { stroke: #c44b2b; }
456
- body.theme-custom .mermaid-preview svg .sankey text { fill: #2c2c2c !important; }
457
-
458
- /* 时序图 (ColaMD) */
459
- body.theme-custom .mermaid-preview svg .actor rect,
460
- body.theme-custom .mermaid-preview svg .actor path { stroke: #c44b2b; }
461
- body.theme-custom .mermaid-preview svg text.actor { fill: #2c2c2c !important; }
462
- body.theme-custom .mermaid-preview svg .messageLine0,
463
- body.theme-custom .mermaid-preview svg .messageLine1 { stroke: #999 !important; }
464
- body.theme-custom .mermaid-preview svg .messageText,
465
- body.theme-custom .mermaid-preview svg .labelText,
466
- body.theme-custom .mermaid-preview svg .loopText tspan,
467
- body.theme-custom .mermaid-preview svg .altText tspan,
468
- body.theme-custom .mermaid-preview svg .optText tspan { fill: #2c2c2c !important; }
469
- body.theme-custom .mermaid-preview svg .loopText,
470
- body.theme-custom .mermaid-preview svg .altText,
471
- body.theme-custom .mermaid-preview svg .optText { fill: #777 !important; }
472
- body.theme-custom .mermaid-preview svg .loopLine,
473
- body.theme-custom .mermaid-preview svg .altLine,
474
- body.theme-custom .mermaid-preview svg .optLine { stroke: #999 !important; }
475
- body.theme-custom .mermaid-preview svg .labelBox { stroke: #d8d3ce; }
476
-
477
- /* 时序图 (Typora) */
478
- .md-diagram-panel.md-mermaid .actor { fill: #eae6e1 !important; stroke: #c44b2b !important; }
479
- .md-diagram-panel.md-mermaid text.actor { fill: #2c2c2c !important; }
480
- .md-diagram-panel.md-mermaid .messageLine0,
481
- .md-diagram-panel.md-mermaid .messageLine1 { stroke: #999 !important; }
482
- .md-diagram-panel.md-mermaid .messageText { fill: #555 !important; }
483
-
484
- /* 类图 */
485
- body.theme-custom .mermaid-preview svg .classBox rect,
486
- body.theme-custom .mermaid-preview svg .classBox path { stroke: #c44b2b; }
487
- body.theme-custom .mermaid-preview svg .classTitle text,
488
- body.theme-custom .mermaid-preview svg .classTitle span { fill: #2c2c2c !important; color: #2c2c2c !important; }
489
- body.theme-custom .mermaid-preview svg .classText text,
490
- body.theme-custom .mermaid-preview svg .classText span { fill: #555 !important; color: #555 !important; }
491
- body.theme-custom .mermaid-preview svg .divider { stroke: #d8d3ce; }
492
- body.theme-custom .mermaid-preview svg .relation { stroke: #999; }
493
-
494
- /* 甘特图 (ColaMD) */
495
- body.theme-custom .mermaid-preview svg .task { stroke: #c44b2b; }
496
- body.theme-custom .mermaid-preview svg .taskText,
497
- body.theme-custom .mermaid-preview svg .taskTextOutsideRight,
498
- body.theme-custom .mermaid-preview svg .taskTextOutsideLeft,
499
- body.theme-custom .mermaid-preview svg .sectionText,
500
- body.theme-custom .mermaid-preview svg .sectionTitle { fill: #2c2c2c !important; }
501
- body.theme-custom .mermaid-preview svg .section rect { stroke: #d8d3ce; }
502
- body.theme-custom .mermaid-preview svg .today { stroke: #c44b2b !important; }
503
- body.theme-custom .mermaid-preview svg .grid .tick line { stroke: #d8d3ce; }
504
- body.theme-custom .mermaid-preview svg .grid .domain { stroke: #999; }
505
- body.theme-custom .mermaid-preview svg .tick text { fill: #777; }
506
-
507
- /* 甘特图 (Typora) */
508
- .md-diagram-panel.md-mermaid .section0,
509
- .md-diagram-panel.md-mermaid .section1,
510
- .md-diagram-panel.md-mermaid .section2,
511
- .md-diagram-panel.md-mermaid .section3 { fill: rgba(196, 75, 43, 0.1) !important; }
512
- .md-diagram-panel.md-mermaid .task0,
513
- .md-diagram-panel.md-mermaid .task1,
514
- .md-diagram-panel.md-mermaid .task2,
515
- .md-diagram-panel.md-mermaid .task3 { fill: #c44b2b !important; stroke: #a33d22 !important; }
516
- .md-diagram-panel.md-mermaid .today { stroke: #c44b2b !important; stroke-width: 2px !important; }
517
-
518
- /* 思维导图 */
519
- body.theme-custom .mermaid-preview svg .mindmap-node rect,
520
- body.theme-custom .mermaid-preview svg .mindmap-node circle,
521
- body.theme-custom .mermaid-preview svg .mindmap-node ellipse,
522
- body.theme-custom .mermaid-preview svg .mindmap-node polygon,
523
- body.theme-custom .mermaid-preview svg .mindmap-node path { stroke: #c44b2b; }
524
- body.theme-custom .mermaid-preview svg .mindmap-node text,
525
- body.theme-custom .mermaid-preview svg .mindmap-node .nodeLabel text,
526
- body.theme-custom .mermaid-preview svg .mindmap-node .nodeLabel span { fill: #2c2c2c !important; color: #2c2c2c !important; }
527
- body.theme-custom .mermaid-preview svg .mindmap-edge { stroke: #999; }
528
-
529
- /* Block 图 */
530
- body.theme-custom .mermaid-preview svg .block rect,
531
- body.theme-custom .mermaid-preview svg .block path { stroke: #c44b2b; }
532
- body.theme-custom .mermaid-preview svg .block text,
533
- body.theme-custom .mermaid-preview svg .block .nodeLabel text,
534
- body.theme-custom .mermaid-preview svg .block .nodeLabel span { fill: #2c2c2c !important; color: #2c2c2c !important; }
535
-
536
- /* ER 图 */
537
- body.theme-custom .mermaid-preview svg .er .entityBox rect,
538
- body.theme-custom .mermaid-preview svg .er .entityBox path { stroke: #c44b2b; }
539
- body.theme-custom .mermaid-preview svg .er text,
540
- body.theme-custom .mermaid-preview svg .er .relationshipLabel { fill: #2c2c2c !important; }
541
- body.theme-custom .mermaid-preview svg .er .relationshipLine { stroke: #999; }
542
-
543
- /* Git 图 */
544
- body.theme-custom .mermaid-preview svg .git .commit rect,
545
- body.theme-custom .mermaid-preview svg .git .commit circle { stroke: #c44b2b; }
546
- body.theme-custom .mermaid-preview svg .git text,
547
- body.theme-custom .mermaid-preview svg .git .branchLabel text { fill: #2c2c2c !important; }
548
-
549
- /* 用户旅程图 */
550
- body.theme-custom .mermaid-preview svg .journey .task rect { stroke: #c44b2b; }
551
- body.theme-custom .mermaid-preview svg .journey text { fill: #2c2c2c !important; }
552
-
553
- /* 时间线 */
554
- body.theme-custom .mermaid-preview svg .timeline rect { stroke: #c44b2b; }
555
- body.theme-custom .mermaid-preview svg .timeline text { fill: #2c2c2c !important; }
556
-
557
- /* C4 架构图 */
558
- body.theme-custom .mermaid-preview svg .c4 .person rect,
559
- body.theme-custom .mermaid-preview svg .c4 .person path,
560
- body.theme-custom .mermaid-preview svg .c4 .system rect,
561
- body.theme-custom .mermaid-preview svg .c4 .system path,
562
- body.theme-custom .mermaid-preview svg .c4 .container rect,
563
- body.theme-custom .mermaid-preview svg .c4 .container path,
564
- body.theme-custom .mermaid-preview svg .c4 .boundary rect,
565
- body.theme-custom .mermaid-preview svg .c4 .boundary path { stroke: #c44b2b; }
566
- body.theme-custom .mermaid-preview svg .c4 text,
567
- body.theme-custom .mermaid-preview svg .c4 span { fill: #2c2c2c !important; color: #2c2c2c !important; }
568
-
569
- /* 人物节点 */
570
- body.theme-custom .mermaid-preview svg .person rect,
571
- body.theme-custom .mermaid-preview svg .person path { stroke: #2c2c2c; }
572
- body.theme-custom .mermaid-preview svg .person-man text { fill: #ffffff !important; }
573
- body.theme-custom .mermaid-preview svg .person-man span { color: #ffffff !important; }
574
-
575
- /* ── 15. YAML 元数据 ── */
576
- pre.md-meta-block,
577
- body.theme-custom .frontmatter,
578
- body.theme-custom .yaml-front-matter {
579
- font-family: "JetBrains Mono", "Fira Code", monospace;
580
- font-size: 0.85em;
581
- background: #eae6e1;
582
- border: 1px solid #d8d3ce;
583
- border-radius: 4px;
584
- padding: 14px 18px;
585
- margin-bottom: 2em;
586
- color: #666;
587
- }
588
-
589
- /* ── 16. 脚注 ── */
590
- .md-footnote { font-size: 0.85em; color: #c44b2b; }
591
- sup.md-footnote { background: transparent; }
592
-
593
- /* ── 17. 目录 ── */
594
- .md-toc { font-size: 0.9em; }
595
- .md-toc-content { margin-left: 0; }
596
- .md-toc-item { color: #2c2c2c; }
597
- .md-toc-h1 .md-toc-inner { font-weight: 700; }
598
-
599
- /* ── 18. 侧边栏 ── */
600
- .sidebar-content { font-family: inherit; }
601
- .file-node-content { line-height: 1.6; }
602
- .file-node-title { font-size: 1em; }
603
-
604
- /* ── 19. 聚焦模式 ── */
605
- .on-focus-mode .md-end-block:not(.md-focus):not(.md-focus-container) * { color: #bbb !important; }
606
- .on-focus-mode .md-end-block:not(.md-focus):not(.md-focus-container) img { opacity: 0.5; }
607
-
608
- /* ── 20. 搜索 & 选择 ── */
609
- ::selection, body.theme-custom ::selection { background: rgba(196, 75, 43, 0.2); }
610
- #write .md-search-hit { background: rgba(196, 75, 43, 0.2); border-radius: 2px; }
611
-
612
- /* ── 21. 滚动条 ── */
613
- ::-webkit-scrollbar,
614
- body.theme-custom ::-webkit-scrollbar { width: 6px; height: 6px; }
615
- ::-webkit-scrollbar-thumb,
616
- body.theme-custom ::-webkit-scrollbar-thumb { background: #ccc8c2; border-radius: 3px; }
617
- ::-webkit-scrollbar-thumb:hover,
618
- body.theme-custom ::-webkit-scrollbar-thumb:hover { background: #b5b0aa; }
619
- ::-webkit-scrollbar-track,
620
- body.theme-custom ::-webkit-scrollbar-track { background: transparent; }
621
-
622
- /* ── 22. Megamenu ── */
623
- .megamenu-content { font-family: inherit; }
624
- #megamenu-back-btn { color: #2c2c2c; }
625
-
626
- /* ── 23. 大纲 ── */
627
- .outline-content { font-size: 0.9em; }
628
- .outline-item { padding: 4px 0; }
629
- .outline-active, .outline-item:hover { color: #c44b2b; }
630
-
631
- /* ── 24. 工具提示 ── */
632
- .ty-tooltip { font-size: 0.85em; background: #333; color: #eee; border-radius: 4px; }
633
-
634
- /* ── 25. 打印 ── */
635
- @media print {
636
- html { font-size: 13px; }
637
- html, body { background: #fff; }
638
- #write { max-width: none; padding: 0; }
639
- pre.md-fences { background: #f5f5f5; color: #333; border: 1px solid #ddd; }
640
- table th { background: #f5f5f5; }
641
- body.theme-custom { background: #fff !important; color: #000 !important; }
642
- body.theme-custom pre {
643
- background: #f5f5f5 !important;
644
- color: #333 !important;
645
- border: 1px solid #ddd !important;
646
- }
647
- body.theme-custom .math-block { background: #fafafa !important; border: 1px solid #ddd !important; }
648
- body.theme-custom .mermaid-block,
649
- .md-diagram-panel.md-mermaid { background: #fafafa !important; border: 1px solid #ddd !important; }
650
- body.theme-custom .mermaid-preview { background: #fafafa !important; border: none !important; }
651
- }
652
-
653
- /* ── 26. 移动端适配 ── */
654
- @media only screen and (max-width:768px) {
655
- body.theme-custom { font-size: 15px; line-height: 1.8; }
656
- body.theme-custom h1 { font-size: 1.5em; }
657
- body.theme-custom h2 { font-size: 1.3em; }
658
- body.theme-custom h3 { font-size: 1.15em; }
659
- body.theme-custom pre { padding: 14px 16px; font-size: 0.82em; }
660
- body.theme-custom table { font-size: 0.85em; }
661
- body.theme-custom table th,
662
- body.theme-custom table td { padding: 8px 10px; }
663
- body.theme-custom blockquote { padding: 12px 14px 12px 18px; }
664
- body.theme-custom .math-block { padding: 12px 0; overflow-x: auto; }
665
- body.theme-custom .mermaid-block,
666
- body.theme-custom .mermaid-preview,
667
- .md-diagram-panel.md-mermaid { padding: 12px; margin: 1em 0; }
668
- body.theme-custom .mermaid-preview svg { max-width: 100% !important; height: auto !important; }
669
- body.theme-custom .mermaid-preview svg text { font-size: 10px !important; }
670
- body.theme-custom .mermaid-preview svg .titleText { font-size: 12px !important; }
671
- }
1
+ /*
2
+ * ColaMD 主题:Elegant(典雅暖调)
3
+ * 风格:暖米色底 + 朱砂红点缀,衬线正文、宽松行距、无衬线干扰
4
+ * 契约:ColaMD Extend 2.7(CodeMirror 6 + Pele)
5
+ *
6
+ * 迁移说明:编辑器换成 CodeMirror 6 后,标题是一「行」带类,引用/代码块是每行
7
+ * 一个 div,旧的文档容器与元素级结构选择器全部失效。
8
+ * 这里保留行级可表达的辨识度:暖米色底、朱砂红加粗与链接、深色代码块、
9
+ * 浅米色表头 + 红色表头线、左侧红竖线引用;图片题注、数学公式容器、
10
+ * YAML 元数据等文档级结构交给上游 document.css。
11
+ */
12
+
13
+ :root {
14
+ /* ── 1.1 Seed Palette(暖调) ── */
15
+ --seed-accent: #b0401f;
16
+ --seed-accent-light: rgba(176, 64, 31, 0.15);
17
+ --seed-accent-dark: #93371a;
18
+ --seed-surface: #f1f1f0;
19
+ --seed-panel: #eaeae9;
20
+ --seed-panel-alt: #e6e6e4;
21
+ --seed-ink: #2c2c2c;
22
+ --seed-ink-muted: #555555;
23
+ --seed-ink-dim: #777777;
24
+ --seed-border: #d4d4d2;
25
+ --seed-border-strong: #b0401f;
26
+
27
+ /* ── 1.2 Semantic Colors(活变量) ── */
28
+ --bg-color: var(--seed-surface);
29
+ --text-color: var(--seed-ink);
30
+ --text-secondary: #444444;
31
+ --text-muted: var(--seed-ink-dim);
32
+ --border-color: var(--seed-border);
33
+ --link-color: var(--seed-accent);
34
+
35
+ --code-bg: var(--seed-panel-alt);
36
+ --code-block-bg: var(--seed-ink);
37
+ --code-block-text: #e0dcd7;
38
+
39
+ --blockquote-border: var(--seed-accent);
40
+ --blockquote-bg: var(--seed-panel);
41
+ --table-header-bg: var(--seed-panel);
42
+
43
+ --selection-bg: rgba(176, 64, 31, 0.2);
44
+ --highlight-bg: var(--seed-accent-light);
45
+
46
+ /* ── 1.3 Typography & Metrics(活变量) ── */
47
+ --font-body: "LXGW WenKai", "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia, "Times New Roman", serif;
48
+ --font-mono: "JetBrains Mono", "Fira Code", "SF Mono", Menlo, Consolas, monospace;
49
+ --editor-font-size: 16px;
50
+ --editor-column-width: 820px;
51
+
52
+ /* ── 1.4 Pele 图表:深色代码块底 + 暖色强调 ── */
53
+ --pele-bg: var(--code-block-bg);
54
+ --pele-fg: var(--code-block-text);
55
+ --pele-muted: #b5afa8;
56
+ --pele-line: #999999;
57
+ --pele-surface: #3a3a3a;
58
+ --pele-surface-alt: #4a4a4a;
59
+ --pele-border: var(--seed-accent);
60
+ --pele-accent: var(--seed-accent);
61
+ --pele-radius: 6px;
62
+ }
63
+
64
+ /* ═══════════════════════════════════════════════════════════
65
+ SECTION 2 — 编辑器 DOM(#editor .cm-content + .cm-md-*)
66
+ ═══════════════════════════════════════════════════════════ */
67
+
68
+ /* ── 2.0 正文:衬线、1.9 倍行距、两端对齐 ── */
69
+ #editor .cm-content {
70
+ font-family: var(--font-body);
71
+ font-size: var(--editor-font-size);
72
+ line-height: 1.9;
73
+ text-align: justify;
74
+ }
75
+
76
+ /* ── 2.1 标题:深墨色,字号阶梯舒缓 ── */
77
+ #editor .cm-content .cm-md-atxheading1,
78
+ #editor .cm-content .cm-md-atxheading2,
79
+ #editor .cm-content .cm-md-atxheading3,
80
+ #editor .cm-content .cm-md-atxheading4,
81
+ #editor .cm-content .cm-md-atxheading5,
82
+ #editor .cm-content .cm-md-atxheading6 {
83
+ font-family: var(--font-body);
84
+ color: var(--text-color);
85
+ font-weight: 700;
86
+ line-height: 1.4;
87
+ text-align: left;
88
+ padding-top: 0.6em;
89
+ }
90
+
91
+ #editor .cm-content .cm-md-atxheading1 {
92
+ font-size: 1.8em;
93
+ padding-top: 1em;
94
+ padding-bottom: 0.3em;
95
+ }
96
+ #editor .cm-content .cm-md-atxheading2 {
97
+ font-size: 1.5em;
98
+ padding-bottom: 0.2em;
99
+ }
100
+ #editor .cm-content .cm-md-atxheading3 { font-size: 1.25em; }
101
+ #editor .cm-content .cm-md-atxheading4 { font-size: 1.1em; }
102
+ #editor .cm-content .cm-md-atxheading5 { font-size: 1em; }
103
+ #editor .cm-content .cm-md-atxheading6 {
104
+ font-size: 0.95em;
105
+ color: var(--text-secondary);
106
+ }
107
+
108
+ /* ── 2.2 行内:朱砂红是唯一的强调色 ── */
109
+ #editor .cm-content .cm-md-strong {
110
+ color: var(--seed-accent);
111
+ font-weight: 700;
112
+ }
113
+ #editor .cm-content .cm-md-em {
114
+ font-style: italic;
115
+ color: var(--text-secondary);
116
+ }
117
+ #editor .cm-content .cm-md-strike {
118
+ color: var(--text-muted);
119
+ text-decoration: line-through;
120
+ }
121
+ #editor .cm-content .cm-md-highlight {
122
+ background: var(--highlight-bg);
123
+ color: var(--text-color);
124
+ padding: 1px 4px;
125
+ border-radius: 2px;
126
+ }
127
+
128
+ /* 链接:朱砂红,悬停行为交给上游 */
129
+ #editor .cm-content .cm-md-link {
130
+ color: var(--link-color);
131
+ text-decoration: none;
132
+ }
133
+ #editor .cm-content .cm-md-url {
134
+ color: var(--text-muted);
135
+ font-size: 0.9em;
136
+ }
137
+
138
+ /* 标记字符:# > - 围栏,压淡 */
139
+ #editor .cm-content .cm-md-marker,
140
+ #editor .cm-content .cm-md-quotemark,
141
+ #editor .cm-content .cm-md-listmark {
142
+ color: var(--text-muted);
143
+ }
144
+
145
+ /* ── 2.3 内联代码:暖灰底 + 朱砂红字,小圆角 ── */
146
+ #editor .cm-content .cm-md-inlinecode {
147
+ font-family: var(--font-mono);
148
+ font-size: 0.9em;
149
+ background: var(--code-bg);
150
+ color: var(--seed-accent);
151
+ padding: 2px 6px;
152
+ margin: 0 2px;
153
+ border-radius: 3px;
154
+ }
155
+
156
+ /* ── 2.4 引用块:米色底 + 朱砂红左竖线(每行一个 div,禁纵向 padding) ── */
157
+ #editor .cm-content .cm-md-blockquote {
158
+ background: var(--blockquote-bg);
159
+ color: var(--text-secondary);
160
+ border-left: 4px solid var(--blockquote-border);
161
+ padding-left: 24px;
162
+ padding-right: 18px;
163
+ }
164
+
165
+ /* ── 2.5 代码块:深墨底 + 暖白字,圆角落在首末行 ── */
166
+ #editor .cm-content .cm-md-codeblock {
167
+ font-family: var(--font-mono);
168
+ font-size: 0.88em;
169
+ line-height: 1.6;
170
+ background: var(--code-block-bg);
171
+ color: var(--code-block-text);
172
+ padding-left: 22px;
173
+ padding-right: 22px;
174
+ }
175
+ #editor .cm-content .cm-md-codeblock-first {
176
+ border-top-left-radius: 6px;
177
+ border-top-right-radius: 6px;
178
+ }
179
+ #editor .cm-content .cm-md-codeblock-last {
180
+ border-bottom-left-radius: 6px;
181
+ border-bottom-right-radius: 6px;
182
+ }
183
+
184
+ /* ── 2.6 表格:米色表头 + 朱砂红表头线 + 浅色行线 ── */
185
+ #editor .cm-content .cm-md-table-widget th,
186
+ #editor .cm-content .cm-md-table-widget td {
187
+ border-color: var(--border-color);
188
+ }
189
+ #editor .cm-content .cm-md-table-widget th {
190
+ background: var(--table-header-bg);
191
+ color: var(--text-color);
192
+ font-weight: 700;
193
+ border-bottom: 2px solid var(--seed-accent);
194
+ }
195
+ #editor .cm-content .cm-md-table-widget tr:hover td {
196
+ background: rgba(176, 64, 31, 0.04);
197
+ }
198
+
199
+ /* ── 2.7 分隔线:浅色细线 ── */
200
+ #editor .cm-content .cm-md-hr {
201
+ border-top: 1px solid var(--border-color);
202
+ margin: 2.5em 0;
203
+ }
204
+
205
+ /* 本主题正文不缩进,故不写 .cm-line 的 text-indent 规则。 */
206
+
207
+ /* ═══════════════════════════════════════════════════════════
208
+ SECTION 3 — 导出 HTML(.colamd-document,只补配色)
209
+ 结构(页边距、标题层级、列表缩进)由上游 document.css 提供。
210
+ ═══════════════════════════════════════════════════════════ */
211
+
212
+ .colamd-document {
213
+ font-family: var(--font-body);
214
+ font-size: var(--editor-font-size);
215
+ line-height: 1.9;
216
+ text-align: justify;
217
+ background: var(--bg-color);
218
+ color: var(--text-color);
219
+ }
220
+
221
+ .colamd-document h1,
222
+ .colamd-document h2,
223
+ .colamd-document h3,
224
+ .colamd-document h4,
225
+ .colamd-document h5,
226
+ .colamd-document h6 {
227
+ font-family: var(--font-body);
228
+ color: var(--text-color);
229
+ font-weight: 700;
230
+ line-height: 1.4;
231
+ }
232
+ .colamd-document h1 { font-size: 1.8em; }
233
+ .colamd-document h2 { font-size: 1.5em; }
234
+ .colamd-document h3 { font-size: 1.25em; }
235
+ .colamd-document h4 { font-size: 1.1em; }
236
+ .colamd-document h5 { font-size: 1em; }
237
+ .colamd-document h6 { font-size: 0.95em; color: var(--text-secondary); }
238
+
239
+ .colamd-document strong { color: var(--seed-accent); }
240
+ .colamd-document em { color: var(--text-secondary); }
241
+ .colamd-document a {
242
+ color: var(--link-color);
243
+ text-decoration: none;
244
+ }
245
+ .colamd-document code {
246
+ background: var(--code-bg);
247
+ color: var(--seed-accent);
248
+ font-family: var(--font-mono);
249
+ border-radius: 3px;
250
+ }
251
+ .colamd-document pre {
252
+ background: var(--code-block-bg);
253
+ border-radius: 6px;
254
+ }
255
+ .colamd-document pre code {
256
+ background: transparent;
257
+ color: var(--code-block-text);
258
+ }
259
+ .colamd-document blockquote {
260
+ background: var(--blockquote-bg);
261
+ color: var(--text-secondary);
262
+ border-left: 4px solid var(--blockquote-border);
263
+ }
264
+ .colamd-document mark {
265
+ background: var(--highlight-bg);
266
+ color: var(--text-color);
267
+ }
268
+ .colamd-document th {
269
+ background: var(--table-header-bg);
270
+ color: var(--text-color);
271
+ border-bottom: 2px solid var(--seed-accent);
272
+ }
273
+ .colamd-document hr { border-top-color: var(--border-color); }
274
+
275
+ /* ═══════════════════════════════════════════════════════════
276
+ SECTION 4 — 打印
277
+ 2.7 直接对当前窗口 printToPDF,屏幕规则原样生效,这里只补保真。
278
+ ═══════════════════════════════════════════════════════════ */
279
+
280
+ @media print {
281
+ html,
282
+ body {
283
+ background: var(--bg-color);
284
+ color: var(--text-color);
285
+ -webkit-print-color-adjust: exact;
286
+ print-color-adjust: exact;
287
+ }
288
+ }