@bytechain.cn/colamd-themes 0.5.9 → 0.6.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.
@@ -0,0 +1,375 @@
1
+ /*
2
+ * ColaMD Theme: swiss-lemon-light
3
+ * 瑞士国际主义 · 柠檬黄 · 亮色(对齐 guizang template-swiss.html 的亮色 .slide)
4
+ * 契约:ColaMD 2.7.13(CodeMirror 6 + Pele)
5
+ *
6
+ * 暖白纸底 #fafaf8 + 墨黑字 #0a0a0a;柠檬黄 #FFD500 作强调。
7
+ * 注意:纯 #FFD500 在纸底上对比仅 1.36:1,故"黄色字"(加粗/链接/强调文字)
8
+ * 用可读的柠檬派生色 #837221;纯黄保留给非文字强调(表头底/下划线/引用线)。
9
+ * 字重沿用模板 "越大越细":标题 200/300,正文 400,表格表头 600,代码 mono。
10
+ * 变量一律写在 :root;编辑器没有 <h1>/<blockquote> 元素。
11
+ * 字体栈严格复制 guizang HTML:--sans (Inter) + --sans-zh (Noto Sans SC) + --mono (JetBrains Mono)。
12
+ */
13
+
14
+ :root {
15
+ /* ── 语义色:暖白纸底 + 墨黑字 + 单一柠檬黄锚点(对映亮色 .slide)── */
16
+ --bg-color: #fafaf8; /* --paper 暖白 */
17
+ --text-color: #0a0a0a; /* --ink 近黑 */
18
+ --text-secondary: #525252; /* --text-secondary gray70 */
19
+ --text-muted: #737373; /* --text-helper gray60 */
20
+ --border-color: #e0e0e0; /* --border-subtle hairline */
21
+ --link-color: #837221; /* 柠檬黄可读前景色:纸底上对比达标(黄色字)*/
22
+
23
+ --code-bg: #f0f0ee; /* --grey-1 浅灰块 */
24
+ --code-block-bg: #f0f0ee;
25
+ --code-block-text: #0a0a0a;
26
+
27
+ --blockquote-border: #FFD500; /* 柠檬黄竖线(callout 语义)*/
28
+ --blockquote-bg: transparent;
29
+ --table-header-bg: #FFD500; /* 黄底黑字表头(accent 块)*/
30
+
31
+ --selection-bg: rgba(255, 213, 0, 0.28);
32
+ --highlight-bg: rgba(255, 213, 0, 0.22);
33
+
34
+ /* ── 字体:严格复制 guizang --sans + --sans-zh + --mono ── */
35
+ --font-body: "Inter", "Helvetica Neue", "Helvetica", "Arial", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", "微软雅黑", sans-serif;
36
+ --font-mono: "JetBrains Mono", "IBM Plex Mono", "SF Mono", "Cascadia Code", "Consolas", "Courier New", ui-monospace, monospace;
37
+ --editor-font-size: 16px;
38
+ --editor-column-width: 780px;
39
+
40
+ /* ── PPT 版式令牌:与 slides.css 的公开契约对齐(瑞士亮色 · 越大越细)──
41
+ 字体与字号严格对齐 deck(--sans Inter 200 / --sans-zh Noto Sans SC / --mono JetBrains):
42
+ 放映态正文基准 clamp(17px,1.35vw,26px),1080p 全屏 26px;deck 的 vw 值按此折算 em——
43
+ h-xl 6vw→4.4em,h-hero-zh 8.4vw→6.2em,章节封 6.4vw→4.7em,.lead 1.55vw→1.15em,
44
+ .kicker 固定 14px,stat-nb 5.6vw→4.1em,h-md 2.6vw→1.9em,.slide 留白 5.5vh 5vw */
45
+ --slide-serif: var(--font-body);
46
+ --slide-mono: var(--font-mono);
47
+ --slide-title-font: var(--font-body);
48
+ --slide-title-size: 4.4em;
49
+ --slide-title-weight: 200;
50
+ --slide-subhead-weight: 300;
51
+ --slide-title-tracking: -0.03em;
52
+ --slide-title-line-height: 1.05;
53
+ --slide-cover-title-size: 6.2em;
54
+ --slide-cover-title-line-height: 0.96;
55
+ --slide-cover-title-tracking: -0.025em;
56
+ --slide-cover-text-align: center;
57
+ --slide-section-title-size: 4.7em;
58
+ --slide-closing-title-size: 4.4em;
59
+ --slide-lead-size: 1.15em;
60
+ --slide-kicker-size: 14px;
61
+ --slide-kicker-tracking: 0.24em;
62
+ --slide-kicker-transform: uppercase;
63
+ --slide-chrome-opacity: 0.6;
64
+ --slide-chrome-transform: uppercase;
65
+ --slide-kpi-number-size: 4.1em;
66
+ --slide-quote-size: 1.9em;
67
+ --slide-page-pad-x: 5vw;
68
+ --slide-page-top-pad: 5.5vh;
69
+ --slide-page-top-pad-print: 48px;
70
+
71
+ /* ── Pele 图表:纸底 + 柠檬黄 ── */
72
+ --pele-bg: #f0f0ee;
73
+ --pele-fg: #0a0a0a;
74
+ --pele-muted: #737373;
75
+ --pele-line: #837221;
76
+ --pele-surface: #fafaf8;
77
+ --pele-surface-alt: #d4d4d2;
78
+ --pele-border: #0a0a0a;
79
+ --pele-accent: #837221;
80
+ --pele-radius: 0px;
81
+ }
82
+
83
+ /* ═══════════════════════════════════════════════════════════
84
+ SECTION 2 — 编辑器 DOM
85
+ ═══════════════════════════════════════════════════════════ */
86
+
87
+ #editor .cm-content {
88
+ font-family: var(--font-body);
89
+ font-size: 16px;
90
+ font-weight: 400;
91
+ line-height: 1.6; /* guizang .body */
92
+ font-feature-settings: "ss01", "cv11";
93
+ -webkit-font-smoothing: antialiased;
94
+ text-rendering: optimizeLegibility;
95
+ text-align: left; /* Swiss flush-left */
96
+ }
97
+
98
+ /* ── 2.1 标题:极轻字重 200/300 + 紧凑负字距(越大越细)── */
99
+ #editor .cm-content .cm-md-atxheading1,
100
+ #editor .cm-content .cm-md-atxheading2,
101
+ #editor .cm-content .cm-md-atxheading3,
102
+ #editor .cm-content .cm-md-atxheading4,
103
+ #editor .cm-content .cm-md-atxheading5,
104
+ #editor .cm-content .cm-md-atxheading6 {
105
+ font-family: var(--font-body);
106
+ color: var(--text-color);
107
+ font-weight: 200;
108
+ line-height: 1.1;
109
+ letter-spacing: -0.03em;
110
+ text-align: left;
111
+ }
112
+
113
+ /* H1 = h-hero-zh;文档 H1 ≈ 2.4em,2px 柠檬黄实线下压 */
114
+ #editor .cm-content .cm-md-atxheading1 {
115
+ font-size: 2.4em;
116
+ letter-spacing: -0.025em;
117
+ padding-bottom: 0.3em;
118
+ border-bottom: 2px solid #FFD500;
119
+ }
120
+ /* H2 = h-xl;文档 H2 ≈ 1.9em,hairline 下压 */
121
+ #editor .cm-content .cm-md-atxheading2 {
122
+ font-size: 1.9em;
123
+ padding-bottom: 0.3em;
124
+ border-bottom: 1px solid var(--border-color);
125
+ }
126
+ /* H3/H4 = h-md 2.6vw weight 300 */
127
+ #editor .cm-content .cm-md-atxheading3 { font-size: 1.4em; font-weight: 300; }
128
+ #editor .cm-content .cm-md-atxheading4 { font-size: 1.2em; font-weight: 300; }
129
+ /* H5/H6 = h-sub 2.2vw weight 400 */
130
+ #editor .cm-content .cm-md-atxheading5 { font-size: 1.05em; font-weight: 400; }
131
+ #editor .cm-content .cm-md-atxheading6 { font-size: 0.95em; font-weight: 400; }
132
+
133
+ /* ── 2.2 行内强调:加粗 = 柠檬黄可读色(t-cat 语义),600 ── */
134
+ #editor .cm-content .cm-md-strong {
135
+ color: var(--link-color);
136
+ font-weight: 600;
137
+ }
138
+ #editor .cm-content .cm-md-em { font-style: italic; color: var(--text-secondary); }
139
+ #editor .cm-content .cm-md-strike { text-decoration: line-through; }
140
+ #editor .cm-content .cm-md-highlight {
141
+ background: var(--highlight-bg);
142
+ color: var(--text-color);
143
+ }
144
+
145
+ /* ── 2.3 链接:柠檬黄可读色 + 底部横线 ── */
146
+ #editor .cm-content .cm-md-link {
147
+ color: var(--link-color);
148
+ text-decoration: none;
149
+ border-bottom: 1px solid var(--link-color);
150
+ }
151
+ #editor .cm-content .cm-md-url { color: var(--text-muted); }
152
+
153
+ /* ── 2.4 内联代码:直角,浅灰块墨字 ── */
154
+ #editor .cm-content .cm-md-inlinecode {
155
+ font-family: var(--font-mono);
156
+ background: var(--code-bg);
157
+ color: var(--code-block-text);
158
+ border-radius: 0;
159
+ padding: 1px 6px;
160
+ }
161
+
162
+ #editor .cm-content .cm-md-marker,
163
+ #editor .cm-content .cm-md-quotemark,
164
+ #editor .cm-content .cm-md-listmark {
165
+ color: var(--text-muted);
166
+ }
167
+
168
+ /* ── 2.5 代码块:浅灰底 + 柠檬黄左竖线,直角 ── */
169
+ #editor .cm-content .cm-md-codeblock {
170
+ font-family: var(--font-mono);
171
+ background: var(--code-block-bg);
172
+ color: var(--code-block-text);
173
+ border-left: 4px solid var(--link-color);
174
+ padding-left: 16px;
175
+ padding-right: 16px;
176
+ }
177
+ #editor .cm-content .cm-md-codeblock-first,
178
+ #editor .cm-content .cm-md-codeblock-last {
179
+ border-radius: 0;
180
+ }
181
+
182
+ /* ── 2.6 引用块:柠檬黄左竖线(callout 语义)── */
183
+ #editor .cm-content .cm-md-blockquote {
184
+ background: var(--blockquote-bg);
185
+ color: var(--text-secondary);
186
+ border-left: 4px solid var(--blockquote-border);
187
+ padding-left: 20px;
188
+ padding-right: 20px;
189
+ }
190
+
191
+ /* ── 2.7 表格:柠檬黄底黑字表头 + hairline ── */
192
+ #editor .cm-content .cm-md-table-widget th,
193
+ #editor .cm-content .cm-md-table-widget td {
194
+ border: 1px solid var(--border-color);
195
+ }
196
+ #editor .cm-content .cm-md-table-widget th {
197
+ background: var(--table-header-bg);
198
+ color: #0a0a0a;
199
+ font-family: var(--font-mono);
200
+ font-weight: 600;
201
+ text-transform: uppercase;
202
+ letter-spacing: 0.15em;
203
+ font-size: 0.875em;
204
+ border-color: #FFD500;
205
+ border-bottom: 2px solid #FFD500;
206
+ }
207
+
208
+ /* ── 2.8 分隔线:hairline ── */
209
+ #editor .cm-content .cm-md-hr {
210
+ border-top-color: var(--border-color);
211
+ margin: 3em 0;
212
+ }
213
+
214
+ /* ── 2.9 中文首行缩进 ── */
215
+ #editor .cm-content .cm-line { text-indent: 2em; }
216
+
217
+ #editor .cm-content .cm-md-atxheading1,
218
+ #editor .cm-content .cm-md-atxheading2,
219
+ #editor .cm-content .cm-md-atxheading3,
220
+ #editor .cm-content .cm-md-atxheading4,
221
+ #editor .cm-content .cm-md-atxheading5,
222
+ #editor .cm-content .cm-md-atxheading6,
223
+ #editor .cm-content .cm-md-blockquote,
224
+ #editor .cm-content .cm-md-codeblock,
225
+ #editor .cm-content .cm-md-hr,
226
+ #editor .cm-content .cm-md-mermaid,
227
+ #editor .cm-content .cm-md-li-0,
228
+ #editor .cm-content .cm-md-li-1,
229
+ #editor .cm-content .cm-md-li-2,
230
+ #editor .cm-content .cm-md-li-3,
231
+ #editor .cm-content .cm-md-li-4,
232
+ #editor .cm-content .cm-md-li-5,
233
+ #editor .cm-content .cm-md-li-6 {
234
+ text-indent: 0;
235
+ }
236
+
237
+ /* ═══════════════════════════════════════════════════════════
238
+ SECTION 3 — 导出 HTML(.colamd-document)
239
+ ═══════════════════════════════════════════════════════════ */
240
+
241
+ .colamd-document {
242
+ font-family: var(--font-body);
243
+ font-size: 16px;
244
+ font-weight: 400;
245
+ line-height: 1.6;
246
+ text-align: left;
247
+ font-feature-settings: "ss01", "cv11";
248
+ color: var(--text-color);
249
+ }
250
+
251
+ .colamd-document h1,
252
+ .colamd-document h2,
253
+ .colamd-document h3,
254
+ .colamd-document h4,
255
+ .colamd-document h5,
256
+ .colamd-document h6 {
257
+ font-family: var(--font-body);
258
+ color: var(--text-color);
259
+ font-weight: 200;
260
+ line-height: 1.1;
261
+ letter-spacing: -0.03em;
262
+ }
263
+ .colamd-document h1 {
264
+ font-size: 2.4em;
265
+ letter-spacing: -0.025em;
266
+ padding-bottom: 0.3em;
267
+ border-bottom: 2px solid #FFD500;
268
+ }
269
+ .colamd-document h2 {
270
+ font-size: 1.9em;
271
+ padding-bottom: 0.3em;
272
+ border-bottom: 1px solid var(--border-color);
273
+ }
274
+ .colamd-document h3, .colamd-document h4 { font-weight: 300; }
275
+ .colamd-document h5, .colamd-document h6 { font-weight: 400; }
276
+
277
+ .colamd-document strong { color: var(--link-color); font-weight: 600; }
278
+ .colamd-document em { font-style: italic; color: var(--text-secondary); }
279
+ .colamd-document a {
280
+ color: var(--link-color);
281
+ text-decoration: none;
282
+ border-bottom: 1px solid var(--link-color);
283
+ }
284
+ .colamd-document code {
285
+ background: var(--code-bg);
286
+ color: var(--code-block-text);
287
+ font-family: var(--font-mono);
288
+ border-radius: 0;
289
+ }
290
+ /* Pele SVG 不自绘背景,导出后需补回代码块底色 */
291
+ .colamd-document svg.pele {
292
+ background: var(--pele-bg);
293
+ border-radius: var(--pele-radius);
294
+ }
295
+ /* 覆盖平台基础样式的圆角——瑞士风必须直角 */
296
+ .colamd-document pre {
297
+ font-family: var(--font-mono);
298
+ background: var(--code-block-bg);
299
+ border-left: 4px solid var(--link-color);
300
+ border-radius: 0;
301
+ }
302
+ .colamd-document pre code { color: var(--code-block-text); }
303
+ .colamd-document blockquote {
304
+ background: var(--blockquote-bg);
305
+ color: var(--text-secondary);
306
+ border-left: 4px solid var(--blockquote-border);
307
+ }
308
+ .colamd-document mark {
309
+ background: var(--highlight-bg);
310
+ color: var(--text-color);
311
+ border-radius: 0;
312
+ }
313
+ .colamd-document th {
314
+ background: var(--table-header-bg);
315
+ color: #0a0a0a;
316
+ font-family: var(--font-mono);
317
+ text-transform: uppercase;
318
+ letter-spacing: 0.15em;
319
+ font-size: 0.875em;
320
+ }
321
+ .colamd-document hr {
322
+ border-top-color: var(--border-color);
323
+ margin: 3em 0;
324
+ }
325
+
326
+ .colamd-document p { text-indent: 2em; }
327
+ .colamd-document li p,
328
+ .colamd-document td p,
329
+ .colamd-document th p,
330
+ .colamd-document blockquote p {
331
+ text-indent: 0;
332
+ }
333
+
334
+ /* ═══════════════════════════════════════════════════════════
335
+ SECTION 3 — 幻灯片版式覆盖(仅放映/打印作用域,SLIDE-02)
336
+ ═══════════════════════════════════════════════════════════ */
337
+
338
+ /* steps 版式:步骤名做成细线描边胶囊(deck .tag 语义——
339
+ 纸底上纯黄 #FFD500 描边对比不足,描边与文字用可读柠檬派生色) */
340
+ body.presenting #editor .cm-content .cm-md-slide-steps .cm-md-listmark,
341
+ body.slides-printing #editor .cm-content .cm-md-slide-steps .cm-md-listmark {
342
+ display: none;
343
+ }
344
+
345
+ body.presenting #editor .cm-content .cm-md-slide-steps .cm-md-strong,
346
+ body.slides-printing #editor .cm-content .cm-md-slide-steps .cm-md-strong {
347
+ display: inline-flex;
348
+ align-items: center;
349
+ justify-content: center;
350
+ flex: 0 0 auto;
351
+ min-width: 2.4em;
352
+ padding: 0.22em 0.9em;
353
+ border: 1.5px solid var(--link-color);
354
+ border-radius: 999px;
355
+ background: transparent;
356
+ color: var(--link-color);
357
+ font-family: var(--slide-title-font);
358
+ font-size: 0.95em;
359
+ line-height: 1.25;
360
+ white-space: nowrap;
361
+ }
362
+
363
+ /* ═══════════════════════════════════════════════════════════
364
+ SECTION 4 — 打印
365
+ ═══════════════════════════════════════════════════════════ */
366
+
367
+ @media print {
368
+ html,
369
+ body {
370
+ background: var(--bg-color);
371
+ color: var(--text-color);
372
+ -webkit-print-color-adjust: exact;
373
+ print-color-adjust: exact;
374
+ }
375
+ }