@bytechain.cn/colamd-themes 0.3.2 → 0.5.1

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