@bytechain.cn/colamd-themes 0.5.1 → 0.5.2

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 (61) hide show
  1. package/README.md +25 -11
  2. package/cordis.patch.yml +9 -0
  3. package/dist/cli.js +3 -3
  4. package/dist/dsh-plugin.d.ts +44 -0
  5. package/dist/dsh-plugin.js +72 -0
  6. package/dist/dsh-plugin.js.map +1 -0
  7. package/dist/generator.d.ts +1 -1
  8. package/dist/generator.js +2 -2
  9. package/dist/index.d.ts +1 -0
  10. package/dist/index.js +2 -0
  11. package/dist/index.js.map +1 -1
  12. package/dist/models.d.ts +1 -1
  13. package/dist/models.js +1 -1
  14. package/dist/renderer.d.ts +2 -2
  15. package/dist/renderer.js +3 -3
  16. package/package.json +22 -2
  17. package/skills/build-skills.sh +5 -5
  18. package/skills/colamd-themes/SKILL.md +5 -5
  19. package/.claude/skills/colamd-themes-preview.skill.md +0 -333
  20. package/.claude/skills/colamd-themes.skill.md +0 -10
  21. package/.dsh/skills/colamd-themes/SKILL.md +0 -14
  22. package/.github/supported-topics.yml +0 -17
  23. package/.hermes/skills/tools/colamd-themes/SKILL.md +0 -14
  24. package/.openclaw/skills/colamd-themes/SKILL.md +0 -21
  25. package/.opencode/skills/colamd-themes/SKILL.md +0 -17
  26. package/.trae/rules/colamd-themes.md +0 -5
  27. package/CHANGELOG.md +0 -331
  28. package/DSH_SUPPORT_SUMMARY.md +0 -87
  29. package/README_CN.md +0 -412
  30. package/RELEASENOTE.md +0 -541
  31. package/mcp-server/dist/index.d.ts +0 -13
  32. package/mcp-server/dist/index.d.ts.map +0 -1
  33. package/mcp-server/dist/index.js.map +0 -1
  34. package/mcp-server/package-lock.json +0 -1759
  35. package/mcp-server/package.json +0 -24
  36. package/mcp-server/src/index.ts +0 -0
  37. package/mcp-server/tsconfig.json +0 -19
  38. package/src/cli.ts +0 -474
  39. package/src/color-systems.ts +0 -289
  40. package/src/color-utils.ts +0 -137
  41. package/src/contrast.ts +0 -66
  42. package/src/docx-style-paradigm.ts +0 -811
  43. package/src/export-cli.ts +0 -356
  44. package/src/extractors/base.ts +0 -8
  45. package/src/extractors/docx-extractor.ts +0 -417
  46. package/src/extractors/pdf-extractor.ts +0 -533
  47. package/src/extractors/url-extractor.ts +0 -846
  48. package/src/generator.ts +0 -197
  49. package/src/index.ts +0 -29
  50. package/src/models.ts +0 -212
  51. package/src/renderer.ts +0 -310
  52. package/src/templates/template.css +0 -220
  53. package/src/templates/theme-paradigm.md +0 -530
  54. package/src/templates/theme-template.hbs +0 -256
  55. package/src/theme-store.ts +0 -185
  56. package/src/types/pdf-parse.d.ts +0 -12
  57. package/src/utils/cli-utils.ts +0 -84
  58. package/src/utils/document-paradigm.ts +0 -118
  59. package/src/validators.ts +0 -298
  60. package/themes-preview/demo-content.md +0 -187
  61. package/tsconfig.json +0 -18
package/src/renderer.ts DELETED
@@ -1,310 +0,0 @@
1
- /**
2
- * Puppeteer-based rendering engine for ColaMD HTML/PDF export.
3
- *
4
- * Uses the @bytechain.cn/colamd 2.x library build (dist/lib/colamd-renderer.js +
5
- * colamd.css, requires ≥2.7.8-rc.1) to create a headless editor, apply themes,
6
- * render mermaid/math, and export standalone HTML or PDF. Theme CSS targets the
7
- * ColaMD 2.7.8-rc.1 contract (machine-readable as themes/contract.json in the
8
- * npm package) and is consumed directly as `:root` declarations.
9
- *
10
- * Architecture:
11
- * Local HTTP server (serves renderer.js + page HTML)
12
- * → Puppeteer page (same-origin, no CORS)
13
- * → createColaMDEditor()
14
- * → applyTheme() + setMarkdown() + ensureAllPluginsRendered()
15
- * → buildExportHTML({ title }) / page.pdf()
16
- */
17
-
18
- import puppeteer, { type Browser, type Page } from "puppeteer";
19
- import { createServer, type Server } from "node:http";
20
- import { readFileSync, existsSync, createReadStream } from "node:fs";
21
- import { resolve, dirname, join } from "node:path";
22
-
23
- // ── Types ──
24
-
25
- /** Input for rendering a markdown document. */
26
- export interface RenderInput {
27
- /** Markdown content string */
28
- markdown: string;
29
- /** Theme name: built-in (light/dark/elegant/newsprint) or "custom:<name>" */
30
- themeName?: string;
31
- /** Custom CSS content (used with "custom:<name>" themes) */
32
- customCSS?: string;
33
- /** Document title for the HTML <title> */
34
- title?: string;
35
- }
36
-
37
- /** Result of a render operation. */
38
- export interface RenderResult {
39
- /** Complete standalone HTML document */
40
- html: string;
41
- }
42
-
43
- /** PDF export options. */
44
- export interface PDFExportOptions {
45
- /** Page format */
46
- format?: "A4" | "Letter" | "A3";
47
- /** Print background colors/images */
48
- printBackground?: boolean;
49
- /** Page margins */
50
- margin?: { top?: string; right?: string; bottom?: string; left?: string };
51
- }
52
-
53
- // ── File resolution ──
54
-
55
- /** Locate the ColaMD renderer ESM bundle in node_modules. */
56
- function findRendererPath(): string {
57
- const candidates = [
58
- resolve(dirname(new URL(import.meta.url).pathname), "../node_modules/@bytechain.cn/colamd/dist/lib/colamd-renderer.js"),
59
- resolve(process.cwd(), "node_modules/@bytechain.cn/colamd/dist/lib/colamd-renderer.js"),
60
- ];
61
- for (const p of candidates) {
62
- if (existsSync(p)) return p;
63
- }
64
- // Detect a 2.x distribution without the library entry (e.g. the 2.7.7 app
65
- // package, or a desktop-only build): give an actionable error.
66
- for (const base of candidates.map((p) => resolve(p, "../../.."))) {
67
- const pkgJson = join(base, "package.json");
68
- if (existsSync(pkgJson)) {
69
- try {
70
- const version = JSON.parse(readFileSync(pkgJson, "utf-8")).version as string;
71
- if (version.startsWith("2.")) {
72
- throw new Error(
73
- `@bytechain.cn/colamd ${version} 不含 colamd-renderer.js 库入口(2.7.8 起恢复提供)。` +
74
- "请升级: npm install @bytechain.cn/colamd@^2.7.8-rc.1"
75
- );
76
- }
77
- } catch (e) {
78
- if (e instanceof Error && e.message.includes("库入口")) throw e;
79
- }
80
- }
81
- }
82
- throw new Error(
83
- "Cannot find @bytechain.cn/colamd renderer. " +
84
- "Install it: npm install @bytechain.cn/colamd@^2.7.8-rc.1"
85
- );
86
- }
87
-
88
- // ── Local HTTP server ──
89
-
90
- const SHELL_HTML = `<!DOCTYPE html>
91
- <html><head>
92
- <meta charset="utf-8">
93
- <link rel="stylesheet" href="/colamd.css">
94
- <style>body{margin:0;padding:0}#editor{width:100%;min-height:100vh}</style>
95
- </head><body><div id="editor"></div></body></html>`;
96
-
97
- interface LocalServer {
98
- port: number;
99
- close(): Promise<void>;
100
- }
101
-
102
- function startLocalServer(rendererPath: string): Promise<LocalServer> {
103
- const cssPath = join(dirname(rendererPath), "colamd.css");
104
- return new Promise((resolveStart, reject) => {
105
- const server: Server = createServer((req, res) => {
106
- if (req.url === "/" || req.url === "/index.html") {
107
- res.writeHead(200, { "Content-Type": "text/html; charset=utf-8" });
108
- res.end(SHELL_HTML);
109
- } else if (req.url === "/colamd-renderer.js") {
110
- res.writeHead(200, { "Content-Type": "application/javascript; charset=utf-8" });
111
- createReadStream(rendererPath).pipe(res);
112
- } else if (req.url === "/colamd.css") {
113
- res.writeHead(200, { "Content-Type": "text/css; charset=utf-8" });
114
- createReadStream(cssPath).pipe(res);
115
- } else {
116
- res.writeHead(404);
117
- res.end();
118
- }
119
- });
120
-
121
- server.listen(0, "127.0.0.1", () => {
122
- const addr = server.address();
123
- const port = typeof addr === "object" && addr ? addr.port : 0;
124
- resolveStart({
125
- port,
126
- close: () =>
127
- new Promise((resolveClose) => server.close(() => resolveClose())),
128
- });
129
- });
130
-
131
- server.on("error", reject);
132
- });
133
- }
134
-
135
- // ── Renderer ──
136
-
137
- export class ColamdRenderer {
138
- private browser: Browser | null = null;
139
- private page: Page | null = null;
140
- private server: LocalServer | null = null;
141
- private ready = false;
142
-
143
- /** Launch Puppeteer and prepare the editor page. */
144
- async init(): Promise<void> {
145
- if (this.browser) return;
146
-
147
- // Start local HTTP server for the renderer bundle
148
- const rendererPath = findRendererPath();
149
- this.server = await startLocalServer(rendererPath);
150
- const origin = `http://127.0.0.1:${this.server.port}`;
151
-
152
- // Launch Puppeteer (use "shell" mode — chrome-headless-shell binary is more
153
- // stable on this Windows environment than the full Chrome --headless=new mode)
154
- this.browser = await puppeteer.launch({
155
- headless: "shell",
156
- args: ["--no-sandbox", "--disable-setuid-sandbox", "--disable-dev-shm-usage"],
157
- });
158
- this.page = await this.browser.newPage();
159
-
160
- // Navigate to shell page (same origin as renderer script)
161
- await this.page.goto(`${origin}/`, { waitUntil: "domcontentloaded" });
162
-
163
- // Load the ColaMD renderer as ESM (same-origin, no CORS)
164
- await this.page.addScriptTag({
165
- type: "module",
166
- content: `
167
- import { createColaMDEditor } from '${origin}/colamd-renderer.js';
168
- window.__colamdReady = createColaMDEditor({
169
- rootId: 'editor',
170
- editable: false
171
- }).then(handle => {
172
- window.__colamdHandle = handle;
173
- return true;
174
- }).catch(err => {
175
- window.__colamdError = err.message;
176
- return false;
177
- });
178
- `,
179
- });
180
-
181
- // Wait for the editor to initialize
182
- await this.page.waitForFunction(
183
- () => (window as any).__colamdHandle || (window as any).__colamdError,
184
- { timeout: 30000 }
185
- );
186
-
187
- const error = await this.page.evaluate(() => (window as any).__colamdError);
188
- if (error) throw new Error(`Editor init failed: ${error}`);
189
-
190
- this.ready = true;
191
- }
192
-
193
- /**
194
- * Render markdown to a standalone HTML document.
195
- */
196
- async render(input: RenderInput): Promise<RenderResult> {
197
- if (!this.ready || !this.page) await this.init();
198
- const page = this.page!;
199
-
200
- // Apply theme — the 2.x renderer consumes :root contract CSS directly
201
- if (input.themeName) {
202
- await page.evaluate(
203
- (name: string, css: string | undefined) => {
204
- (window as any).__colamdHandle.applyTheme(name, css || undefined);
205
- },
206
- input.themeName,
207
- input.customCSS || undefined
208
- );
209
- }
210
-
211
- // Set markdown content
212
- await page.evaluate((md: string) => {
213
- (window as any).__colamdHandle.setMarkdown(md);
214
- }, input.markdown);
215
-
216
- // Wait for all plugins (mermaid, math) to finish rendering
217
- await page.evaluate(async () => {
218
- await (window as any).__colamdHandle.ensureAllPluginsRendered();
219
- });
220
-
221
- // Additional settle time for complex diagrams
222
- await new Promise((r) => setTimeout(r, 500));
223
-
224
- // Build export HTML (2.x API: title goes through the options object)
225
- const html = await page.evaluate((title: string | undefined) => {
226
- return (window as any).__colamdHandle.buildExportHTML({ title });
227
- }, input.title);
228
-
229
- return { html };
230
- }
231
-
232
- /**
233
- * Render markdown and export as PDF.
234
- */
235
- async exportPDF(input: RenderInput, options: PDFExportOptions = {}): Promise<Buffer> {
236
- if (!this.ready || !this.page) await this.init();
237
-
238
- // First render to HTML
239
- const { html } = await this.render(input);
240
-
241
- // Load the HTML in a fresh page for PDF generation
242
- const pdfPage = await this.browser!.newPage();
243
- await pdfPage.setContent(html, { waitUntil: "load", timeout: 30000 });
244
-
245
- // NOTE: Do NOT use emulateMediaType("screen") here.
246
- // The CSS template includes comprehensive @media print rules (SECTION 6)
247
- // with !important declarations and print-color-adjust: exact for proper styling.
248
- // Using screen mode would prevent these print-specific styles from applying.
249
-
250
- const pdfBuffer = await pdfPage.pdf({
251
- format: options.format ?? "A4",
252
- printBackground: options.printBackground ?? true,
253
- margin: options.margin ?? { top: "15mm", right: "15mm", bottom: "15mm", left: "15mm" },
254
- });
255
-
256
- await pdfPage.close();
257
- return Buffer.from(pdfBuffer);
258
- }
259
-
260
- /** Shut down the browser and local server with proper resource cleanup. */
261
- async close(): Promise<void> {
262
- try {
263
- // Explicitly close page first to prevent zombie processes
264
- if (this.page) {
265
- await this.page.close().catch(() => {});
266
- this.page = null;
267
- }
268
-
269
- if (this.browser) {
270
- await this.browser.close();
271
- this.browser = null;
272
- }
273
- } finally {
274
- this.ready = false;
275
-
276
- if (this.server) {
277
- await this.server.close();
278
- this.server = null;
279
- }
280
- }
281
- }
282
- }
283
-
284
- /**
285
- * One-shot render: init → render → close.
286
- * Convenience for single-file export.
287
- */
288
- export async function renderMarkdown(input: RenderInput): Promise<RenderResult> {
289
- const renderer = new ColamdRenderer();
290
- try {
291
- return await renderer.render(input);
292
- } finally {
293
- await renderer.close();
294
- }
295
- }
296
-
297
- /**
298
- * One-shot PDF export: init → render PDF → close.
299
- */
300
- export async function renderPDF(
301
- input: RenderInput,
302
- options?: PDFExportOptions
303
- ): Promise<Buffer> {
304
- const renderer = new ColamdRenderer();
305
- try {
306
- return await renderer.exportPDF(input, options);
307
- } finally {
308
- await renderer.close();
309
- }
310
- }
@@ -1,220 +0,0 @@
1
- /* ===== ColaMD 自定义主题模板(2.7 契约)=====
2
-
3
- 复制这一份改就是了:改配色、改字体、改文件名,然后 Theme > Import Theme,
4
- 或者放进 ~/.colamd/themes/。
5
-
6
- 三件事先说清楚:
7
-
8
- 1. 变量写在 :root 里。没写的活变量继承 Light 主题的默认值,所以只想改配色的话,
9
- 下面第一段往往就够了,选择器那一段可以整段删掉。
10
- 2. 编辑器里没有 <h1>、<blockquote> 这种元素:标题是一「行」带一个类,引用与代码块
11
- 是每一行一个 div,加粗是一个 span。所以只能选 .cm-md-* 这些钩子。
12
- 3. 引用块与代码块**不能加纵向 padding**:一行一个 div,纵向 padding 会按行累加。
13
- 要留呼吸感只给 padding-left / padding-right。
14
-
15
- 这份故意不是一套好看的配色,它是照着改的起点。 */
16
-
17
- :root {
18
- /* ---- 语义色(活变量)---- */
19
- --bg-color: #ffffff; /* 正文底色 */
20
- --text-color: #24292f; /* 正文字色 */
21
- --text-secondary: #57606a; /* 次级文字:引用、标签 */
22
- --text-muted: #6e7781; /* 压淡文字:行号、链接地址、列表圆点 */
23
- --border-color: #d0d7de; /* 分隔线、表格边框、面板描边 */
24
- --link-color: #0969da; /* 链接、搜索高亮 */
25
-
26
- --code-bg: rgba(175, 184, 193, 0.2); /* 行内代码底色 */
27
- --code-block-bg: #f6f8fa; /* 代码块底色:明暗决定 Pele 图表配色 */
28
- --code-block-text: #24292f; /* 代码块文字 */
29
-
30
- --blockquote-border: #d0d7de; /* 引用块左竖线 */
31
- --blockquote-bg: transparent; /* 引用块底色,transparent 就是不要底 */
32
- --table-header-bg: #f6f8fa; /* 表头底色 */
33
- --selection-bg: rgba(9, 105, 218, 0.15);/* 选中背景 */
34
- --highlight-bg: #fff3bf; /* ==高亮== 底色 */
35
-
36
- /* ---- 字体与度量(活变量)---- */
37
- --font-body: Georgia, 'Songti SC', 'Noto Serif SC', serif;
38
- --font-mono: 'SF Mono', 'Fira Code', Menlo, Consolas, monospace;
39
- --editor-font-size: 16px;
40
- --editor-column-width: 780px;
41
-
42
- /* ---- Pele 图表(可选,9 个)----
43
- 图直接画在 --code-block-bg 上,缺省会由代码块底色与字色推导。 */
44
- --pele-bg: var(--code-block-bg);
45
- --pele-fg: var(--code-block-text);
46
- --pele-muted: color-mix(in srgb, var(--code-block-text) 70%, var(--code-block-bg));
47
- --pele-line: var(--code-block-text);
48
- --pele-surface: color-mix(in srgb, var(--code-block-text) 18%, var(--code-block-bg));
49
- --pele-surface-alt: color-mix(in srgb, var(--code-block-text) 28%, var(--code-block-bg));
50
- --pele-border: color-mix(in srgb, var(--code-block-text) 45%, var(--code-block-bg));
51
- --pele-accent: var(--link-color);
52
- --pele-radius: 6px;
53
- }
54
-
55
- /* ===== 编辑器 DOM =====
56
- CodeMirror 6 的选择器优先级:行级规则写成「两个类」才压得住它运行时注入的
57
- baseTheme,所以下面一律用 #editor .cm-content .cm-md-*。 */
58
-
59
- #editor .cm-content {
60
- font-family: var(--font-body);
61
- line-height: 1.75;
62
- }
63
-
64
- /* 标题。只要一级二级就这样写,三级往下照抄类名即可。 */
65
- #editor .cm-content .cm-md-atxheading1,
66
- #editor .cm-content .cm-md-atxheading2 {
67
- color: #1b4f72;
68
- padding-bottom: 0.25em;
69
- border-bottom: 1px solid var(--border-color);
70
- }
71
- #editor .cm-content .cm-md-atxheading3,
72
- #editor .cm-content .cm-md-atxheading4,
73
- #editor .cm-content .cm-md-atxheading5,
74
- #editor .cm-content .cm-md-atxheading6 {
75
- color: #1b4f72;
76
- }
77
-
78
- /* 行内格式。 */
79
- #editor .cm-content .cm-md-strong { color: var(--link-color); }
80
- #editor .cm-content .cm-md-em { font-style: italic; }
81
- #editor .cm-content .cm-md-strike { text-decoration: line-through; }
82
- #editor .cm-content .cm-md-highlight { background: var(--highlight-bg); }
83
- #editor .cm-content .cm-md-link { color: var(--link-color); }
84
- #editor .cm-content .cm-md-url { color: var(--text-muted); }
85
-
86
- #editor .cm-content .cm-md-inlinecode {
87
- font-family: var(--font-mono);
88
- background: var(--code-bg);
89
- color: var(--text-color);
90
- border-radius: 3px;
91
- }
92
-
93
- /* 标记字符(#、>、-、围栏):光标不在这一行时压淡。 */
94
- #editor .cm-content .cm-md-marker,
95
- #editor .cm-content .cm-md-quotemark,
96
- #editor .cm-content .cm-md-listmark {
97
- color: var(--text-muted);
98
- }
99
-
100
- /* 引用块:一行一个 div,所以只给左右内边距。 */
101
- #editor .cm-content .cm-md-blockquote {
102
- background: var(--blockquote-bg);
103
- color: var(--text-secondary);
104
- border-left: 3px solid var(--blockquote-border);
105
- padding-left: 16px;
106
- padding-right: 16px;
107
- }
108
-
109
- /* 代码块:同样一行一个 div;圆角放在首行/末行。 */
110
- #editor .cm-content .cm-md-codeblock {
111
- background: var(--code-block-bg);
112
- color: var(--code-block-text);
113
- padding-left: 16px;
114
- padding-right: 16px;
115
- }
116
- #editor .cm-content .cm-md-codeblock-first {
117
- border-top-left-radius: 6px;
118
- border-top-right-radius: 6px;
119
- }
120
- #editor .cm-content .cm-md-codeblock-last {
121
- border-bottom-left-radius: 6px;
122
- border-bottom-right-radius: 6px;
123
- }
124
-
125
- /* 表格:单元格是 .cm-md-table-widget 里的 th / td。 */
126
- #editor .cm-content .cm-md-table-widget th,
127
- #editor .cm-content .cm-md-table-widget td {
128
- border-color: var(--border-color);
129
- }
130
- #editor .cm-content .cm-md-table-widget th {
131
- background: var(--table-header-bg);
132
- color: var(--text-color);
133
- border-bottom: 2px solid var(--link-color);
134
- }
135
-
136
- /* 分隔线。 */
137
- #editor .cm-content .cm-md-hr { border-top-color: var(--border-color); }
138
-
139
- /* 中文正文首行缩进:一行就是一个 div,标题/引用/代码/列表行归零。 */
140
- #editor .cm-content .cm-line { text-indent: 2em; }
141
-
142
- #editor .cm-content .cm-md-atxheading1,
143
- #editor .cm-content .cm-md-atxheading2,
144
- #editor .cm-content .cm-md-atxheading3,
145
- #editor .cm-content .cm-md-atxheading4,
146
- #editor .cm-content .cm-md-atxheading5,
147
- #editor .cm-content .cm-md-atxheading6,
148
- #editor .cm-content .cm-md-blockquote,
149
- #editor .cm-content .cm-md-codeblock,
150
- #editor .cm-content .cm-md-hr,
151
- #editor .cm-content .cm-md-mermaid,
152
- #editor .cm-content .cm-md-li-0,
153
- #editor .cm-content .cm-md-li-1,
154
- #editor .cm-content .cm-md-li-2,
155
- #editor .cm-content .cm-md-li-3,
156
- #editor .cm-content .cm-md-li-4,
157
- #editor .cm-content .cm-md-li-5,
158
- #editor .cm-content .cm-md-li-6 {
159
- text-indent: 0;
160
- }
161
-
162
- /* ===== 导出的 HTML =====
163
- 导出件是语义标签(h1/p/pre/table…),挂在 .colamd-document 上,
164
- 编辑器里不存在这个类。document.css 已给结构,这里只补配色。 */
165
-
166
- .colamd-document {
167
- font-family: var(--font-body);
168
- font-size: var(--editor-font-size);
169
- line-height: 1.75;
170
- }
171
-
172
- .colamd-document h1,
173
- .colamd-document h2,
174
- .colamd-document h3,
175
- .colamd-document h4,
176
- .colamd-document h5,
177
- .colamd-document h6 {
178
- color: #1b4f72;
179
- }
180
-
181
- .colamd-document strong { color: var(--link-color); }
182
- .colamd-document code {
183
- background: var(--code-bg);
184
- color: var(--text-color);
185
- font-family: var(--font-mono);
186
- }
187
- .colamd-document pre { background: var(--code-block-bg); }
188
- .colamd-document pre code { color: var(--code-block-text); }
189
- .colamd-document blockquote {
190
- background: var(--blockquote-bg);
191
- color: var(--text-secondary);
192
- border-left-color: var(--blockquote-border);
193
- }
194
- .colamd-document mark { background: var(--highlight-bg); }
195
- .colamd-document th {
196
- background: var(--table-header-bg);
197
- border-bottom: 2px solid var(--link-color);
198
- }
199
- .colamd-document hr { border-top-color: var(--border-color); }
200
-
201
- .colamd-document p { text-indent: 2em; }
202
- .colamd-document li p,
203
- .colamd-document td p,
204
- .colamd-document th p,
205
- .colamd-document blockquote p {
206
- text-indent: 0;
207
- }
208
-
209
- /* ===== 打印 =====
210
- 应用直接对当前窗口 printToPDF,上面所有规则原样生效。 */
211
-
212
- @media print {
213
- html,
214
- body {
215
- background: var(--bg-color);
216
- color: var(--text-color);
217
- -webkit-print-color-adjust: exact;
218
- print-color-adjust: exact;
219
- }
220
- }