@bytechain.cn/colamd 2.7.13-rc.1 → 2.8.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.
- package/README.md +5 -2
- package/README_CN.md +5 -2
- package/dist/lib/colamd-renderer.js +19817 -18358
- package/dist/lib/colamd.css +1 -1
- package/dist/renderer/assets/{2DXBBFLN-zwCk4Mxf.js → 2DXBBFLN-BcQoTXNK.js} +4 -4
- package/dist/renderer/assets/{46IJ22JX-CcgX9r7n.js → 46IJ22JX-Dvln4uUB.js} +5 -5
- package/dist/renderer/assets/{4TTDE5I4-DseEAfc2.js → 4TTDE5I4-LOG7xsNo.js} +3 -3
- package/dist/renderer/assets/{4UF3HTLV-B4wB5AKU.js → 4UF3HTLV-B5M4TbQl.js} +4 -4
- package/dist/renderer/assets/{AAXQQPKT-DWob5xGg.js → AAXQQPKT-S6Q6iTwj.js} +8 -8
- package/dist/renderer/assets/{AKE5O7KZ-vOSPM9bT.js → AKE5O7KZ-DgRxWRXD.js} +5 -5
- package/dist/renderer/assets/{BNMLP6AG-Cm5E3l75.js → BNMLP6AG-DSQgcgO4.js} +7 -7
- package/dist/renderer/assets/{DR6PKOQU-BY27B6Tm.js → DR6PKOQU-BSlXBi4M.js} +3 -3
- package/dist/renderer/assets/{E4RJ7UJB-B9Qt1DBg.js → E4RJ7UJB-AOICEUO8.js} +6 -6
- package/dist/renderer/assets/{ELSXBIJH-Dd46ncmF.js → ELSXBIJH-6yzOt2yu.js} +1 -1
- package/dist/renderer/assets/{ERTIBQVS-Ctuly7ru.js → ERTIBQVS-Bwlpwnl5.js} +4 -4
- package/dist/renderer/assets/{F653G4FO-BAG78YUI.js → F653G4FO-Bv18U9we.js} +8 -8
- package/dist/renderer/assets/{FKCDD66M-BYnIt2s5.js → FKCDD66M-BACYwspg.js} +1 -1
- package/dist/renderer/assets/{FP7KDXVC-1kxF0Go3.js → FP7KDXVC-CzGjSBpi.js} +6 -6
- package/dist/renderer/assets/{FT5I3RHX-DBz5zOl-.js → FT5I3RHX-S570rXpT.js} +7 -7
- package/dist/renderer/assets/{GY35JXOZ-FFtwzQYZ.js → GY35JXOZ-cSQ3vgtQ.js} +4 -4
- package/dist/renderer/assets/{H5EEJPP2-CzwQt4p_.js → H5EEJPP2-B5mRihtC.js} +9 -9
- package/dist/renderer/assets/{HWDLEDTA-BoEElC3j.js → HWDLEDTA-QxGhC7BD.js} +1 -1
- package/dist/renderer/assets/{JZWSX6AR-BJkYh7st.js → JZWSX6AR-D5J8dvEc.js} +2 -2
- package/dist/renderer/assets/{KQOEJWJY-B_gT6pV7.js → KQOEJWJY-B1H_7gPD.js} +1 -1
- package/dist/renderer/assets/{KS3BB3KE-Bp4Ml3CE.js → KS3BB3KE-DLlGsWQC.js} +5 -5
- package/dist/renderer/assets/{KXJRRZHI-Cpc8aBTp.js → KXJRRZHI-rxZ-n8Go.js} +3 -3
- package/dist/renderer/assets/{MFVI5XKI-tGMP0W95.js → MFVI5XKI-CQp2wV67.js} +1 -1
- package/dist/renderer/assets/{MWY2J62P-Dp5JIcym.js → MWY2J62P-CdKsEllR.js} +5 -5
- package/dist/renderer/assets/{MXGNCBL2-_tOBtwJ3.js → MXGNCBL2-CpHADYfy.js} +5 -5
- package/dist/renderer/assets/{N6DAJLIZ-B0Ni9aJP.js → N6DAJLIZ-z4bfft0m.js} +2 -2
- package/dist/renderer/assets/{NU5M23IW-Dq9-m-cn.js → NU5M23IW-BdEspGlf.js} +5 -5
- package/dist/renderer/assets/{NV4XNBIS-DrbQOkvO.js → NV4XNBIS-DwWAiQZN.js} +7 -7
- package/dist/renderer/assets/{OGLU4SIR-Dk2ltttF.js → OGLU4SIR-B4O60CC1.js} +5 -5
- package/dist/renderer/assets/{OUNS5N76-xZZw3I4z.js → OUNS5N76-DRQSAFpx.js} +6 -6
- package/dist/renderer/assets/{PU4ISKXV-C2MIDpGs.js → PU4ISKXV-CH7B9Xam.js} +5 -5
- package/dist/renderer/assets/{PUZGS23X-DFCoUCN_.js → PUZGS23X-Czec-t51.js} +1 -1
- package/dist/renderer/assets/{Q3IYVLG5-D3j0WKcV.js → Q3IYVLG5-ppP144xP.js} +5 -5
- package/dist/renderer/assets/{QYHQDLKZ-B0CE5fTR.js → QYHQDLKZ-BqPSAS2H.js} +9 -9
- package/dist/renderer/assets/{RZSVICHU-BSj4YQaY.js → RZSVICHU-_ZqNTL97.js} +1 -1
- package/dist/renderer/assets/{UEXXS2NB-CsxAjwQ4.js → UEXXS2NB-rgOpII99.js} +1 -1
- package/dist/renderer/assets/{UHTQJXKL-g4xFs4o0.js → UHTQJXKL-AI90fkq9.js} +5 -5
- package/dist/renderer/assets/{URA2L2QI-CaQCavyx.js → URA2L2QI-BDDmGORh.js} +1 -1
- package/dist/renderer/assets/{UXCHDUKG-SdHIAded.js → UXCHDUKG-DcMu-Kjz.js} +5 -5
- package/dist/renderer/assets/{VKNV3BUX-CAufMpR3.js → VKNV3BUX-BoFccAWM.js} +6 -6
- package/dist/renderer/assets/{VMV7XPHP-BTz-DDJE.js → VMV7XPHP-B4mGwDDN.js} +1 -1
- package/dist/renderer/assets/{WEVWDWVA-BTzIOcFk.js → WEVWDWVA-BM5eqE-B.js} +1 -1
- package/dist/renderer/assets/{XRRJ35LF-CqWXQoQc.js → XRRJ35LF-Cb6fWs_U.js} +4 -4
- package/dist/renderer/assets/{YFKBLVVN-CobClKiQ.js → YFKBLVVN-DJPx2596.js} +4 -4
- package/dist/renderer/assets/{YHRE5QGZ-DJVf9-VA.js → YHRE5QGZ-DA0Ne8ZS.js} +7 -7
- package/dist/renderer/assets/{ZF3OVT4B-4h2uC2Nf.js → ZF3OVT4B-CC3b1pZi.js} +3 -3
- package/dist/renderer/assets/{index-DsYLJ8It.js → index--lwcDMTj.js} +3 -3
- package/dist/renderer/assets/{index-CBD7Wlx8.js → index-5TWFI5jV.js} +1 -1
- package/dist/renderer/assets/{index-_-G3H01P.js → index-B-Tvkk_D.js} +1 -1
- package/dist/renderer/assets/{index-lPCBuTEj.js → index-B66yNs8z.js} +1 -1
- package/dist/renderer/assets/{index-D9fcCIeQ.js → index-BUO7yV_Q.js} +1 -1
- package/dist/renderer/assets/{index-DAwDMFVz.js → index-BjG9rVTb.js} +2345 -493
- package/dist/renderer/assets/{index-DgC9JAzE.js → index-CFKk8_-a.js} +3 -3
- package/dist/renderer/assets/{index-D6i0AdBR.js → index-CJQRWrTj.js} +1 -1
- package/dist/renderer/assets/{index-BZK9uVRR.js → index-CTBBXEX2.js} +1 -1
- package/dist/renderer/assets/{index-Gr-12Gzq.js → index-CcwQz0gI.js} +1 -1
- package/dist/renderer/assets/{index-BHqRO3CW.js → index-CipBATEm.js} +1 -1
- package/dist/renderer/assets/{index-De7RE4Mo.js → index-Co-0vhM1.js} +1 -1
- package/dist/renderer/assets/{index-BqpGj9MR.js → index-Cyi8NXI_.js} +1 -1
- package/dist/renderer/assets/{index-B6uVUc9e.js → index-D0d2vg7k.js} +3 -3
- package/dist/renderer/assets/{index-DkTSflhI.js → index-D4NskBFS.js} +1 -1
- package/dist/renderer/assets/{index-3SmJ-5Dc.js → index-DEjGaOKF.js} +1 -1
- package/dist/renderer/assets/{index-1hwQGecd.js → index-DI9_AaWi.js} +1 -1
- package/dist/renderer/assets/{index-BwFsNvvN.css → index-DM3GNRiR.css} +1158 -29
- package/dist/renderer/assets/{index-qlWwPzMe.js → index-Ditiw7Uj.js} +1 -1
- package/dist/renderer/assets/{index-CpAWIQHT.js → index-DypVmFXi.js} +1 -1
- package/dist/renderer/assets/{index-B0zpPg3h.js → index-pHq11714.js} +1 -1
- package/dist/renderer/assets/{index-OOnbRmFx.js → index-rA_KpISM.js} +1 -1
- package/dist/renderer/assets/{lazy-DReExUTA.js → lazy-C1NE8LhM.js} +3 -3
- package/dist/renderer/assets/{web-h4mYLq72.js → web-Bct4Qz8N.js} +1 -1
- package/dist/renderer/assets/{web-DErzcmb7.js → web-CI4szGaS.js} +2 -2
- package/dist/renderer/assets/{web-DocK2vhG.js → web-Db6-iOH9.js} +1 -1
- package/dist/renderer/index.html +3 -3
- package/package.json +11 -2
- package/themes/contract.json +3 -1
|
@@ -1849,13 +1849,40 @@ body.source-mode #editor .cm-content {
|
|
|
1849
1849
|
* 层级由代码算出来写在类名里(cm-md-li-0 … cm-md-li-6)。
|
|
1850
1850
|
* 嵌套时同一行会同时带外层与内层的类,所以这里按层级从小到大排列,
|
|
1851
1851
|
* 靠顺序让最内层的那个值生效。第 1 层缩进 1.5em(旧版是 ul 的 24px),每深一层加 1.5em。 */
|
|
1852
|
-
.cm-content .cm-md-li-0 { padding-left: 1.5em; }
|
|
1853
|
-
.cm-content .cm-md-li-1 { padding-left: 3em; }
|
|
1854
|
-
.cm-content .cm-md-li-2 { padding-left: 4.5em; }
|
|
1855
|
-
.cm-content .cm-md-li-3 { padding-left: 6em; }
|
|
1856
|
-
.cm-content .cm-md-li-4 { padding-left: 7.5em; }
|
|
1857
|
-
.cm-content .cm-md-li-5 { padding-left: 9em; }
|
|
1858
|
-
.cm-content .cm-md-li-6 { padding-left: 10.5em; }
|
|
1852
|
+
.cm-content .cm-md-li-0:not(.cm-md-li-blank) { padding-left: 1.5em; }
|
|
1853
|
+
.cm-content .cm-md-li-1:not(.cm-md-li-blank) { padding-left: 3em; }
|
|
1854
|
+
.cm-content .cm-md-li-2:not(.cm-md-li-blank) { padding-left: 4.5em; }
|
|
1855
|
+
.cm-content .cm-md-li-3:not(.cm-md-li-blank) { padding-left: 6em; }
|
|
1856
|
+
.cm-content .cm-md-li-4:not(.cm-md-li-blank) { padding-left: 7.5em; }
|
|
1857
|
+
.cm-content .cm-md-li-5:not(.cm-md-li-blank) { padding-left: 9em; }
|
|
1858
|
+
.cm-content .cm-md-li-6:not(.cm-md-li-blank) { padding-left: 10.5em; }
|
|
1859
|
+
|
|
1860
|
+
/* 有序列表悬挂缩进:首行序号起点与同级无序圆点对齐,长句折行后对齐正文首字。 */
|
|
1861
|
+
.cm-content .cm-md-li-ordered { text-indent: -1.35em; }
|
|
1862
|
+
.cm-content .cm-md-li-ordered.cm-md-li-0 { padding-left: 2.85em; }
|
|
1863
|
+
.cm-content .cm-md-li-ordered.cm-md-li-1 { padding-left: 4.35em; }
|
|
1864
|
+
.cm-content .cm-md-li-ordered.cm-md-li-2 { padding-left: 5.85em; }
|
|
1865
|
+
.cm-content .cm-md-li-ordered.cm-md-li-3 { padding-left: 7.35em; }
|
|
1866
|
+
.cm-content .cm-md-li-ordered.cm-md-li-4 { padding-left: 8.85em; }
|
|
1867
|
+
.cm-content .cm-md-li-ordered.cm-md-li-5 { padding-left: 10.35em; }
|
|
1868
|
+
.cm-content .cm-md-li-ordered.cm-md-li-6 { padding-left: 11.85em; }
|
|
1869
|
+
|
|
1870
|
+
/* 引用块内列表缩进:高优先级避免被 elegant / sepia 等主题的 #editor .cm-content .cm-md-blockquote 盖掉,
|
|
1871
|
+
* 导致有序序号叠加 text-indent 后贴住引用左竖线或嵌套层级塌陷。 */
|
|
1872
|
+
#editor .cm-content .cm-md-blockquote.cm-md-li-0:not(.cm-md-li-blank) { padding-left: 2.2em; }
|
|
1873
|
+
#editor .cm-content .cm-md-blockquote.cm-md-li-1:not(.cm-md-li-blank) { padding-left: 3.7em; }
|
|
1874
|
+
#editor .cm-content .cm-md-blockquote.cm-md-li-2:not(.cm-md-li-blank) { padding-left: 5.2em; }
|
|
1875
|
+
#editor .cm-content .cm-md-blockquote.cm-md-li-3:not(.cm-md-li-blank) { padding-left: 6.7em; }
|
|
1876
|
+
#editor .cm-content .cm-md-blockquote.cm-md-li-4:not(.cm-md-li-blank) { padding-left: 8.2em; }
|
|
1877
|
+
#editor .cm-content .cm-md-blockquote.cm-md-li-5:not(.cm-md-li-blank) { padding-left: 9.7em; }
|
|
1878
|
+
#editor .cm-content .cm-md-blockquote.cm-md-li-6:not(.cm-md-li-blank) { padding-left: 11.2em; }
|
|
1879
|
+
#editor .cm-content .cm-md-blockquote.cm-md-li-ordered.cm-md-li-0 { padding-left: 3.55em; }
|
|
1880
|
+
#editor .cm-content .cm-md-blockquote.cm-md-li-ordered.cm-md-li-1 { padding-left: 5.05em; }
|
|
1881
|
+
#editor .cm-content .cm-md-blockquote.cm-md-li-ordered.cm-md-li-2 { padding-left: 6.55em; }
|
|
1882
|
+
#editor .cm-content .cm-md-blockquote.cm-md-li-ordered.cm-md-li-3 { padding-left: 8.05em; }
|
|
1883
|
+
#editor .cm-content .cm-md-blockquote.cm-md-li-ordered.cm-md-li-4 { padding-left: 9.55em; }
|
|
1884
|
+
#editor .cm-content .cm-md-blockquote.cm-md-li-ordered.cm-md-li-5 { padding-left: 11.05em; }
|
|
1885
|
+
#editor .cm-content .cm-md-blockquote.cm-md-li-ordered.cm-md-li-6 { padding-left: 12.55em; }
|
|
1859
1886
|
|
|
1860
1887
|
/* 无序列表的圆点。宽度与 `- ` 接近,避免换掉标记时行内文字抖动。
|
|
1861
1888
|
*
|
|
@@ -1875,6 +1902,7 @@ body.source-mode #editor .cm-content {
|
|
|
1875
1902
|
.cm-content .cm-md-li .cm-md-listmark,
|
|
1876
1903
|
.cm-content .cm-md-li .cm-md-listmark * {
|
|
1877
1904
|
color: var(--text-color);
|
|
1905
|
+
font-variant-numeric: tabular-nums;
|
|
1878
1906
|
}
|
|
1879
1907
|
|
|
1880
1908
|
/* ======= 代码块 ======= */
|
|
@@ -2215,33 +2243,32 @@ body.exporting .cm-content .cm-md-frontmatter {
|
|
|
2215
2243
|
}
|
|
2216
2244
|
}
|
|
2217
2245
|
|
|
2218
|
-
/* =======
|
|
2246
|
+
/* ======= pele 变量 ======= */
|
|
2219
2247
|
|
|
2220
|
-
/*
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
.cm-md-mermaid
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
color: var(--text-muted);
|
|
2228
|
-
font-size: 0.9em;
|
|
2248
|
+
/* Pele 画图用的变量。它的 SVG 里写的是 `var(--pele-*)`,在 SVG 落进的文档里取值,
|
|
2249
|
+
所以换主题不用重画。
|
|
2250
|
+
|
|
2251
|
+
定义在 body 上,不在 .cm-md-mermaid 上:幻灯片版式(themes/slides.css 的强调色
|
|
2252
|
+
描边、列表符号、步骤胶囊)与幻灯片 PDF 导出都要在同一份作用域里取这组变量。
|
|
2253
|
+
定义在 mermaid 块里时,body 与 :root 都取不到它们——幻灯片的强调色规则一律
|
|
2254
|
+
退化成正文色,导出 PDF 也就没有底色(2026-11-23 实测)。
|
|
2229
2255
|
|
|
2230
|
-
|
|
2231
|
-
|
|
2256
|
+
body 上的自定义属性在 body 处解析,主题的 body.theme-* 覆盖照常生效;
|
|
2257
|
+
放进 .cm-md-mermaid 里时反而要绕一圈才能拿到主题色。
|
|
2232
2258
|
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2259
|
+
取值的依据是图**画在什么底上**。以前这里按「图浮在代码块底色上」取代码块配色,
|
|
2260
|
+
但 mermaid 围栏是**整块替换**:源码行连同 `.cm-md-codeblock` 一起没了,widget 的
|
|
2261
|
+
祖先链是 .cm-content > .cm-lineWrapping > .cm-md-mermaid,没有代码块底色,
|
|
2262
|
+
SVG 画布本身也不画背景(2026-11-14 实测)。于是浅色主题配深色代码块的两个
|
|
2263
|
+
主题——elegant、bear——把 #e0dcd7 这类浅色线条画在了 #f0edea 的纸面上,糊成一片。
|
|
2238
2264
|
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2265
|
+
所以底和字都从**页面**上取:浅色主题得到深字浅底,深色主题得到浅字深底,
|
|
2266
|
+
跟其他浅色主题(light/notion/sepia/writer)现在的表现一致。导出 HTML 和打印
|
|
2267
|
+
走的是同一套变量,纸面上的配色也跟着对了。
|
|
2242
2268
|
|
|
2243
|
-
|
|
2244
|
-
|
|
2269
|
+
百分比是量着定的:节点填充最初取 10%,Nord 上量出来是 #383E49 贴在 #262C37 的底上,
|
|
2270
|
+
只靠一圈描边分界,显得糊(2026-10-19)。18% / 28% / 45% 三档在 9 个主题上都拉开了。 */
|
|
2271
|
+
body {
|
|
2245
2272
|
--pele-bg: var(--bg-color);
|
|
2246
2273
|
--pele-fg: var(--text-color);
|
|
2247
2274
|
--pele-muted: color-mix(in srgb, var(--text-color) 70%, var(--bg-color));
|
|
@@ -2253,6 +2280,20 @@ body.exporting .cm-content .cm-md-frontmatter {
|
|
|
2253
2280
|
--pele-radius: 6px;
|
|
2254
2281
|
}
|
|
2255
2282
|
|
|
2283
|
+
/* ======= mermaid ======= */
|
|
2284
|
+
|
|
2285
|
+
/* 不带 .cm-content 前缀:导出的 HTML 里 mermaid 块落在 .colamd-document 下,
|
|
2286
|
+
没有 .cm-content 祖先;选择器收在编辑器里,导出文档的 SVG 就解析不到
|
|
2287
|
+
--pele-*,只能吃 pele 自己的兜底色,颜色跟界面对不上(导出 HTML 实测)。
|
|
2288
|
+
--pele-* 本身定义在 body 上(见上),这里只管图的排版。 */
|
|
2289
|
+
.cm-md-mermaid {
|
|
2290
|
+
display: block;
|
|
2291
|
+
text-align: center;
|
|
2292
|
+
padding: 0.8em 0;
|
|
2293
|
+
color: var(--text-muted);
|
|
2294
|
+
font-size: 0.9em;
|
|
2295
|
+
}
|
|
2296
|
+
|
|
2256
2297
|
.cm-md-mermaid svg {
|
|
2257
2298
|
max-width: 100%;
|
|
2258
2299
|
height: auto;
|
|
@@ -2671,3 +2712,1091 @@ body.theme-midnight {
|
|
|
2671
2712
|
font-size: 0.75em;
|
|
2672
2713
|
vertical-align: super;
|
|
2673
2714
|
}
|
|
2715
|
+
/* 幻灯片版式包(slides.css)
|
|
2716
|
+
*
|
|
2717
|
+
* 一页在 markdown 里声明版式:`---` 后写一个页头块,第一行是 `<!-- slide: cover`,
|
|
2718
|
+
* 后续可写 kicker / label / chapter 字段;该页所有行便带上 `cm-md-slide-<版式>` 类
|
|
2719
|
+
* (editor/slide-layout.ts 打的),这里的规则在放映(body.presenting)与导出
|
|
2720
|
+
* (body.slides-printing)时命中,编辑视图里一条也不生效。版式名与 markdown 结构
|
|
2721
|
+
* (标题/列表/引用)共同构成公开契约:自定义主题或用户 CSS 可以覆盖任何一条,
|
|
2722
|
+
* 也可以照样新增自己的版式。
|
|
2723
|
+
*
|
|
2724
|
+
* 页角色也由 Markdown 结构给出:一页第一个标题是页标题(cm-md-page-title),标题
|
|
2725
|
+
* 后第一段是导语(cm-md-page-lead),标题前紧邻的段落兜底当 kicker。
|
|
2726
|
+
*
|
|
2727
|
+
* 整副牌还有 deck 级公共元素(chrome):一个 `<!-- deck … -->` 块(logo / brand /
|
|
2728
|
+
* title / meta)写在文档顶部,放映与导出的每页固定位置呈现,DOM 由 slides-enhance.ts
|
|
2729
|
+
* 挂载(.slide-chrome / .slide-foot / .slide-ghost)。
|
|
2730
|
+
*
|
|
2731
|
+
* 设计语言(学杂志风网页 PPT 与报告类 PPTX 的共性,色彩仍只引 themes/contract.json
|
|
2732
|
+
* 的活变量,随主题走):
|
|
2733
|
+
* - 字体三件套:衬线(标题/大数字/金句)、无衬线(正文)、等宽(chrome、页码、标签)
|
|
2734
|
+
* - 细线代替色块:1px 分隔线、tag 边框、卡片描边
|
|
2735
|
+
* - 全出血:内容占满 16:9 纸面,只留 6vw 边距,不再聚在中央窄栏
|
|
2736
|
+
* - 幽灵装饰:右下角超大低透明度页码(放映);封面与章节页保留 chrome,
|
|
2737
|
+
* 只有收束页淡出
|
|
2738
|
+
*
|
|
2739
|
+
* 两种作用域写法,各有分工:
|
|
2740
|
+
* - 容器级:放映时 slides-enhance 会把当前页版式写进 #editor 的 data-slide-layout
|
|
2741
|
+
* 属性,页面级布局(双栏、封面排版)用它选;只在放映时存在,导出是流式分纸,
|
|
2742
|
+
* 没有「当前页」可言。
|
|
2743
|
+
* - 行级:直接选 .cm-md-slide-* 的行,放映导出都生效;导出的双栏/卡片用
|
|
2744
|
+
* inline-block 在纸面上排出来(页首行保持 block,分页符 break-before 依赖它)。
|
|
2745
|
+
*/
|
|
2746
|
+
|
|
2747
|
+
/* ─── 版式令牌:主题与导入 CSS 的入口 ────────────────────────────────
|
|
2748
|
+
* 默认值放在 :root,内置主题用 body.theme-* 覆盖;用户导入的 CSS 在
|
|
2749
|
+
* slides.css 之后加载,写 `body { --slide-*: … }` 即可定义自己的 PPT 气质。
|
|
2750
|
+
* 想直接改结构,也可以覆写 body.presenting .cm-md-page-title 这类规则。 */
|
|
2751
|
+
:root {
|
|
2752
|
+
--slide-serif: 'Songti SC', 'Noto Serif CJK SC', 'Noto Serif SC', 'Source Han Serif SC',
|
|
2753
|
+
'STSong', 'SimSun', Georgia, serif;
|
|
2754
|
+
--slide-mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, 'Menlo', monospace;
|
|
2755
|
+
|
|
2756
|
+
--slide-title-font: var(--slide-serif);
|
|
2757
|
+
--slide-title-size: 4.2em;
|
|
2758
|
+
--slide-title-weight: 700;
|
|
2759
|
+
--slide-subhead-weight: 600;
|
|
2760
|
+
--slide-title-tracking: -0.01em;
|
|
2761
|
+
--slide-title-line-height: 1.08;
|
|
2762
|
+
--slide-cover-title-size: 6.8em;
|
|
2763
|
+
--slide-cover-title-line-height: 0.98;
|
|
2764
|
+
--slide-cover-title-tracking: -0.02em;
|
|
2765
|
+
--slide-section-title-size: 5.2em;
|
|
2766
|
+
--slide-closing-title-size: 4.2em;
|
|
2767
|
+
|
|
2768
|
+
--slide-lead-size: 1.25em;
|
|
2769
|
+
--slide-kicker-size: clamp(11px, 0.72vw, 15px);
|
|
2770
|
+
--slide-kicker-tracking: 0.3em;
|
|
2771
|
+
--slide-kicker-transform: uppercase;
|
|
2772
|
+
|
|
2773
|
+
--slide-chrome-opacity: 0.68;
|
|
2774
|
+
--slide-chrome-transform: uppercase;
|
|
2775
|
+
--slide-kpi-number-size: 3.8em;
|
|
2776
|
+
--slide-quote-size: 2.4em;
|
|
2777
|
+
|
|
2778
|
+
--slide-page-pad-x: 6vw;
|
|
2779
|
+
--slide-page-top-pad: 61px;
|
|
2780
|
+
/* 放映与导出共用的基准字号。纸面 1920×1080 时 1.35vw 解出 25.92px:
|
|
2781
|
+
导出不再自带一套字号(2026-11-23 之前导出写死 24px,稿子看着和放映
|
|
2782
|
+
不是同一份)。 */
|
|
2783
|
+
--slide-body-size: clamp(17px, 1.35vw, 26px);
|
|
2784
|
+
/* 跟着视口走的几处:chrome 的上下留白、logo 的高、页脚的留白、图的高度上限。
|
|
2785
|
+
做成令牌,是为了让导出能把它们按 1920×1080 的纸面定死(见 slides-export.ts):
|
|
2786
|
+
导出在屏幕布局里量页高,屏幕的视口不是纸面,靠视口的值两处会对不上。 */
|
|
2787
|
+
--slide-chrome-pad-y: clamp(20px, 3.2vh, 40px);
|
|
2788
|
+
--slide-chrome-logo-h: clamp(18px, 1.6vw, 30px);
|
|
2789
|
+
--slide-foot-pad-y: clamp(16px, 2.4vh, 28px);
|
|
2790
|
+
/* 图的高度上限。放映时 base.css 对 .cm-content 里的 img/svg 统一给 72vh,
|
|
2791
|
+
这里取同一个数,导出才能按纸面 1080 的 72vh 解出一样的大小(之前写 62vh,
|
|
2792
|
+
放映被 base.css 压回 72vh,导出却按 62vh 收,纸上的图小一圈)。 */
|
|
2793
|
+
--slide-img-max-h: 72vh;
|
|
2794
|
+
--slide-figure-max-h: 66vh;
|
|
2795
|
+
--slide-cover-text-align: left;
|
|
2796
|
+
--slide-cover-lead-inline: 0;
|
|
2797
|
+
}
|
|
2798
|
+
|
|
2799
|
+
/* 主题气质:不只换色,标题字体、字号与 chrome 的声音也跟主题走。
|
|
2800
|
+
* 默认 light 保留杂志式衬线;Notion 走无衬线居中封面,Writer 走等宽标题。 */
|
|
2801
|
+
body.theme-notion {
|
|
2802
|
+
--slide-title-font: 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
|
|
2803
|
+
--slide-title-weight: 600;
|
|
2804
|
+
--slide-title-tracking: -0.02em;
|
|
2805
|
+
--slide-cover-title-size: 5.4em;
|
|
2806
|
+
--slide-section-title-size: 4.4em;
|
|
2807
|
+
--slide-kicker-size: clamp(10px, 0.64vw, 13px);
|
|
2808
|
+
--slide-kicker-tracking: 0.16em;
|
|
2809
|
+
--slide-kicker-transform: none;
|
|
2810
|
+
--slide-chrome-transform: none;
|
|
2811
|
+
--slide-chrome-opacity: 0.55;
|
|
2812
|
+
--slide-cover-text-align: center;
|
|
2813
|
+
--slide-cover-lead-inline: auto;
|
|
2814
|
+
}
|
|
2815
|
+
|
|
2816
|
+
body.theme-writer {
|
|
2817
|
+
--slide-title-font: var(--slide-mono);
|
|
2818
|
+
--slide-title-weight: 500;
|
|
2819
|
+
--slide-title-tracking: 0;
|
|
2820
|
+
--slide-cover-title-size: 5.2em;
|
|
2821
|
+
--slide-section-title-size: 4.2em;
|
|
2822
|
+
--slide-kicker-tracking: 0.18em;
|
|
2823
|
+
--slide-kicker-transform: none;
|
|
2824
|
+
}
|
|
2825
|
+
|
|
2826
|
+
body.theme-elegant {
|
|
2827
|
+
--slide-title-font: var(--slide-serif);
|
|
2828
|
+
--slide-title-weight: 600;
|
|
2829
|
+
--slide-cover-title-size: 7.2em;
|
|
2830
|
+
}
|
|
2831
|
+
|
|
2832
|
+
body.theme-sepia {
|
|
2833
|
+
--slide-title-font: var(--slide-serif);
|
|
2834
|
+
--slide-title-weight: 700;
|
|
2835
|
+
--slide-cover-title-size: 6.4em;
|
|
2836
|
+
}
|
|
2837
|
+
|
|
2838
|
+
body.theme-bear {
|
|
2839
|
+
--slide-title-font: var(--slide-serif);
|
|
2840
|
+
--slide-title-weight: 800;
|
|
2841
|
+
--slide-cover-title-size: 6.2em;
|
|
2842
|
+
--slide-title-tracking: -0.02em;
|
|
2843
|
+
}
|
|
2844
|
+
|
|
2845
|
+
body.theme-dark,
|
|
2846
|
+
body.theme-solarized-dark,
|
|
2847
|
+
body.theme-nord,
|
|
2848
|
+
body.theme-gruvbox,
|
|
2849
|
+
body.theme-dracula,
|
|
2850
|
+
body.theme-midnight {
|
|
2851
|
+
--slide-title-weight: 600;
|
|
2852
|
+
--slide-chrome-opacity: 0.82;
|
|
2853
|
+
}
|
|
2854
|
+
|
|
2855
|
+
/* ─── 页首安全区与指令行 ──────────────────────────────────────────────
|
|
2856
|
+
* chrome 悬在页顶(约 60px 高),每页第一条线(cm-md-page-start)统一留出
|
|
2857
|
+
* padding-top 当安全区。指令行往往是 page-start:它自己压成零内容盒
|
|
2858
|
+
* (visibility + 字号 0),padding 只留一次——多行指令块的其他行绝不能再吃
|
|
2859
|
+
* 一次 84/96px,否则四行页头块就是三百多像素的空白。
|
|
2860
|
+
* 导出不能用 display:none(page-start 藏了 break-before 就失效),正好同构。 */
|
|
2861
|
+
body.presenting #editor .cm-md-slide-directive {
|
|
2862
|
+
font-size: 0 !important;
|
|
2863
|
+
line-height: 0 !important;
|
|
2864
|
+
visibility: hidden;
|
|
2865
|
+
margin: 0 !important;
|
|
2866
|
+
padding: 0 !important;
|
|
2867
|
+
border: none !important;
|
|
2868
|
+
}
|
|
2869
|
+
|
|
2870
|
+
body.slides-printing #editor .cm-md-slide-directive {
|
|
2871
|
+
font-size: 0 !important;
|
|
2872
|
+
line-height: 0 !important;
|
|
2873
|
+
visibility: hidden;
|
|
2874
|
+
margin: 0 !important;
|
|
2875
|
+
padding: 0 !important;
|
|
2876
|
+
border: none !important;
|
|
2877
|
+
}
|
|
2878
|
+
|
|
2879
|
+
/* 只有整块指令的第一行(页首)承担安全区,后续字段行零高度。 */
|
|
2880
|
+
body.presenting #editor .cm-md-slide-directive.cm-md-page-start {
|
|
2881
|
+
padding-top: var(--slide-page-top-pad) !important;
|
|
2882
|
+
}
|
|
2883
|
+
|
|
2884
|
+
body.slides-printing #editor .cm-md-slide-directive.cm-md-page-start {
|
|
2885
|
+
padding-top: var(--slide-page-top-pad) !important;
|
|
2886
|
+
}
|
|
2887
|
+
|
|
2888
|
+
/* 结构兜底的 kicker:标题前那段文字在放映/导出里不占位,文字由标题行的
|
|
2889
|
+
* ::before 显示,源行留在编辑器里照常可改。不能用 display:none:这一行
|
|
2890
|
+
* 可能就是 page-start,分页符依赖它。 */
|
|
2891
|
+
body.presenting .cm-md-page-kicker,
|
|
2892
|
+
body.slides-printing .cm-md-page-kicker {
|
|
2893
|
+
font-size: 0 !important;
|
|
2894
|
+
line-height: 0 !important;
|
|
2895
|
+
visibility: hidden;
|
|
2896
|
+
margin: 0 !important;
|
|
2897
|
+
padding: 0 !important;
|
|
2898
|
+
border: none !important;
|
|
2899
|
+
}
|
|
2900
|
+
|
|
2901
|
+
/* kicker 源行正好是页首时,它还得承担页顶安全区:文字藏掉,内距留下。 */
|
|
2902
|
+
body.presenting .cm-md-page-kicker.cm-md-page-start {
|
|
2903
|
+
padding-top: var(--slide-page-top-pad) !important;
|
|
2904
|
+
}
|
|
2905
|
+
|
|
2906
|
+
body.slides-printing .cm-md-page-kicker.cm-md-page-start {
|
|
2907
|
+
padding-top: var(--slide-page-top-pad) !important;
|
|
2908
|
+
}
|
|
2909
|
+
|
|
2910
|
+
/* 没写指令的页:安全区落在第一条内容行上。 */
|
|
2911
|
+
body.presenting .cm-md-page-start {
|
|
2912
|
+
padding-top: var(--slide-page-top-pad);
|
|
2913
|
+
}
|
|
2914
|
+
|
|
2915
|
+
body.slides-printing .cm-md-page-start {
|
|
2916
|
+
padding-top: var(--slide-page-top-pad);
|
|
2917
|
+
}
|
|
2918
|
+
|
|
2919
|
+
/* ─── deck chrome ─────────────────────────────────────────────────── */
|
|
2920
|
+
.slide-chrome,
|
|
2921
|
+
.slide-foot,
|
|
2922
|
+
.slide-ghost {
|
|
2923
|
+
/* 等宽小字是 chrome 的声音(杂志风惯例);衬线留给标题与品牌名。 */
|
|
2924
|
+
font-family: var(--slide-mono, ui-monospace, Consolas, monospace);
|
|
2925
|
+
color: var(--text-color);
|
|
2926
|
+
}
|
|
2927
|
+
|
|
2928
|
+
.slide-chrome {
|
|
2929
|
+
position: fixed;
|
|
2930
|
+
top: 0;
|
|
2931
|
+
left: 0;
|
|
2932
|
+
right: 0;
|
|
2933
|
+
z-index: 40;
|
|
2934
|
+
display: none;
|
|
2935
|
+
align-items: center;
|
|
2936
|
+
padding: var(--slide-chrome-pad-y) var(--slide-page-pad-x) 0;
|
|
2937
|
+
font-size: 12px;
|
|
2938
|
+
font-weight: 500;
|
|
2939
|
+
letter-spacing: 0.18em;
|
|
2940
|
+
text-transform: var(--slide-chrome-transform, uppercase);
|
|
2941
|
+
opacity: var(--slide-chrome-opacity, 0.68);
|
|
2942
|
+
}
|
|
2943
|
+
|
|
2944
|
+
body.presenting .slide-chrome,
|
|
2945
|
+
body.slides-printing .slide-chrome {
|
|
2946
|
+
display: flex;
|
|
2947
|
+
}
|
|
2948
|
+
|
|
2949
|
+
.slide-chrome-left,
|
|
2950
|
+
.slide-chrome-right {
|
|
2951
|
+
display: flex;
|
|
2952
|
+
align-items: center;
|
|
2953
|
+
gap: 1.4em;
|
|
2954
|
+
min-width: 0;
|
|
2955
|
+
}
|
|
2956
|
+
|
|
2957
|
+
/* 左组与右组之间拉一根 1px 细线,杂志 chrome 的标准做法。 */
|
|
2958
|
+
.slide-chrome-left {
|
|
2959
|
+
flex: 1;
|
|
2960
|
+
}
|
|
2961
|
+
|
|
2962
|
+
.slide-chrome-left::after {
|
|
2963
|
+
content: '';
|
|
2964
|
+
flex: 1;
|
|
2965
|
+
min-width: 3em;
|
|
2966
|
+
height: 1px;
|
|
2967
|
+
margin-left: 0.5em;
|
|
2968
|
+
background: currentColor;
|
|
2969
|
+
opacity: 0.35;
|
|
2970
|
+
}
|
|
2971
|
+
|
|
2972
|
+
.slide-chrome-logo {
|
|
2973
|
+
height: var(--slide-chrome-logo-h);
|
|
2974
|
+
width: auto;
|
|
2975
|
+
max-width: 180px;
|
|
2976
|
+
object-fit: contain;
|
|
2977
|
+
display: block;
|
|
2978
|
+
}
|
|
2979
|
+
|
|
2980
|
+
.slide-foot {
|
|
2981
|
+
position: fixed;
|
|
2982
|
+
left: 0;
|
|
2983
|
+
right: 0;
|
|
2984
|
+
bottom: 0;
|
|
2985
|
+
z-index: 40;
|
|
2986
|
+
display: none;
|
|
2987
|
+
align-items: baseline;
|
|
2988
|
+
justify-content: space-between;
|
|
2989
|
+
padding: 0 var(--slide-page-pad-x) var(--slide-foot-pad-y);
|
|
2990
|
+
font-size: 11px;
|
|
2991
|
+
letter-spacing: 0.16em;
|
|
2992
|
+
text-transform: var(--slide-chrome-transform, uppercase);
|
|
2993
|
+
opacity: 0.55;
|
|
2994
|
+
}
|
|
2995
|
+
|
|
2996
|
+
body.presenting .slide-foot,
|
|
2997
|
+
body.slides-printing .slide-foot {
|
|
2998
|
+
display: flex;
|
|
2999
|
+
}
|
|
3000
|
+
|
|
3001
|
+
.slide-foot-brand {
|
|
3002
|
+
font-family: var(--slide-title-font, var(--slide-serif, Georgia, serif));
|
|
3003
|
+
font-size: 13px;
|
|
3004
|
+
font-weight: 500;
|
|
3005
|
+
letter-spacing: 0.08em;
|
|
3006
|
+
text-transform: none;
|
|
3007
|
+
}
|
|
3008
|
+
|
|
3009
|
+
/* 幽灵页码:右下角超大衬线数字,透明度压到几乎看不见,翻页跟着换数。 */
|
|
3010
|
+
.slide-ghost {
|
|
3011
|
+
position: fixed;
|
|
3012
|
+
right: 4vw;
|
|
3013
|
+
bottom: 7vh;
|
|
3014
|
+
z-index: 0;
|
|
3015
|
+
display: none;
|
|
3016
|
+
font-family: var(--slide-title-font, var(--slide-serif, Georgia, serif));
|
|
3017
|
+
font-weight: 800;
|
|
3018
|
+
font-size: 26vh;
|
|
3019
|
+
line-height: 1;
|
|
3020
|
+
opacity: 0.05;
|
|
3021
|
+
pointer-events: none;
|
|
3022
|
+
font-feature-settings: 'tnum';
|
|
3023
|
+
}
|
|
3024
|
+
|
|
3025
|
+
body.presenting .slide-ghost {
|
|
3026
|
+
display: block;
|
|
3027
|
+
}
|
|
3028
|
+
|
|
3029
|
+
/* 打印里每页各不相同的东西(页码、幽灵数字)没法随纸复刻,藏掉;
|
|
3030
|
+
logo/标题/meta/品牌名是静态的,fixed 元素会被 Chromium 复刻到每张纸。 */
|
|
3031
|
+
body.slides-printing .slide-ghost,
|
|
3032
|
+
body.slides-printing .slide-foot-num {
|
|
3033
|
+
display: none !important;
|
|
3034
|
+
}
|
|
3035
|
+
|
|
3036
|
+
/* chrome/foot/幽灵页码统一走透明度过渡,翻到收束页时一起淡出。 */
|
|
3037
|
+
body.presenting .slide-chrome,
|
|
3038
|
+
body.presenting .slide-foot,
|
|
3039
|
+
body.presenting .slide-ghost {
|
|
3040
|
+
transition: opacity 0.45s ease;
|
|
3041
|
+
}
|
|
3042
|
+
|
|
3043
|
+
/* 封面和章节页保留 chrome:logo、报告名和章节文案是模板封面的一部分,
|
|
3044
|
+
* 只有收束页整页压淡时才把 chrome 一起淡出。 */
|
|
3045
|
+
body.presenting:has(#editor[data-slide-layout='closing']) .slide-chrome,
|
|
3046
|
+
body.presenting:has(#editor[data-slide-layout='closing']) .slide-foot {
|
|
3047
|
+
opacity: 0;
|
|
3048
|
+
}
|
|
3049
|
+
|
|
3050
|
+
body.presenting:has(#editor[data-slide-layout='cover']) .slide-ghost,
|
|
3051
|
+
body.presenting:has(#editor[data-slide-layout='section']) .slide-ghost,
|
|
3052
|
+
body.presenting:has(#editor[data-slide-layout='closing']) .slide-ghost {
|
|
3053
|
+
opacity: 0;
|
|
3054
|
+
}
|
|
3055
|
+
|
|
3056
|
+
/* ─── 版式字体族与全出血 ────────────────────────────────────────────
|
|
3057
|
+
* 衬线栈把中文衬线排在前面(宋体系):杂志感来自中文衬线的骨架,只在
|
|
3058
|
+
* 拉丁字母上找 Georgia 是不够的。等宽栈同理,中文等宽缺字时退回系统字体。 */
|
|
3059
|
+
/* 全出血:正文铺满纸面,只留 6vw 边距——幻灯片不是文档,不要阅读列宽。
|
|
3060
|
+
* 放映与导出同一条:纸面 1920×1080 时 6vw 解出 115.2px。 */
|
|
3061
|
+
body.presenting #editor .cm-content,
|
|
3062
|
+
body.slides-printing #editor .cm-content {
|
|
3063
|
+
width: 100% !important;
|
|
3064
|
+
max-width: none !important;
|
|
3065
|
+
margin: 0 !important;
|
|
3066
|
+
padding: 0 var(--slide-page-pad-x) !important;
|
|
3067
|
+
}
|
|
3068
|
+
|
|
3069
|
+
/* 行也铺满版心。放映有 base.css 的 `.cm-content > * { max-width: 100% }`,
|
|
3070
|
+
* 把 page-default 的 82%、page-lead 的 68% 一起顶掉;导出没有那一条,行会被
|
|
3071
|
+
* 百分比压窄——figure 页的图再按 70% 缩一次,纸上的图比放映小一圈
|
|
3072
|
+
* (2026-11-24 报的)。这里补上同一条,两边量出来才是同一个宽度。 */
|
|
3073
|
+
body.slides-printing #editor .cm-content > * {
|
|
3074
|
+
max-width: 100%;
|
|
3075
|
+
}
|
|
3076
|
+
|
|
3077
|
+
/* 基准字号:PPT 的字号要跟画面走,不能跟主题的阅读字号走。
|
|
3078
|
+
* 1080p 全屏 ≈ 26px 正文 → 内容标题 ≈ 109px、封面主标题 ≈ 177px;窄窗口退到 17px。
|
|
3079
|
+
* 下面的字号阶梯全部是相对它的 em,一处调整整副牌等比缩放。
|
|
3080
|
+
* 导出用同一个令牌:纸面 1920×1080 时 1.35vw 解出 25.92px。 */
|
|
3081
|
+
body.presenting #editor .cm-content,
|
|
3082
|
+
body.slides-printing #editor .cm-content {
|
|
3083
|
+
font-size: var(--slide-body-size);
|
|
3084
|
+
}
|
|
3085
|
+
|
|
3086
|
+
/* ─── 通用字号阶梯(全出血后的 PPT 惯例)────────────────────────────
|
|
3087
|
+
* 标题用衬线、去文档式下划线。真正决定页标题大小的是下面的
|
|
3088
|
+
* .cm-md-page-title:不管 Markdown 写成 h1 还是 h2,一页只认第一个标题。
|
|
3089
|
+
* 与主题文档样式同权重时本文件在打包顺序里排最后。 */
|
|
3090
|
+
body.presenting .cm-md-atxheading1,
|
|
3091
|
+
body.slides-printing .cm-md-atxheading1 {
|
|
3092
|
+
font-family: var(--slide-title-font, var(--slide-serif, Georgia, serif));
|
|
3093
|
+
font-size: 3.2em;
|
|
3094
|
+
font-weight: var(--slide-title-weight, 700);
|
|
3095
|
+
line-height: 1.18;
|
|
3096
|
+
letter-spacing: var(--slide-title-tracking, -0.01em);
|
|
3097
|
+
border-bottom: none;
|
|
3098
|
+
padding-top: 0;
|
|
3099
|
+
margin-bottom: 0.45em;
|
|
3100
|
+
}
|
|
3101
|
+
|
|
3102
|
+
body.presenting .cm-md-atxheading2,
|
|
3103
|
+
body.slides-printing .cm-md-atxheading2 {
|
|
3104
|
+
font-family: var(--slide-title-font, var(--slide-serif, Georgia, serif));
|
|
3105
|
+
font-size: 2.2em;
|
|
3106
|
+
font-weight: var(--slide-subhead-weight, 600);
|
|
3107
|
+
line-height: 1.3;
|
|
3108
|
+
border-bottom: none;
|
|
3109
|
+
padding-top: 0;
|
|
3110
|
+
margin-bottom: 0.4em;
|
|
3111
|
+
}
|
|
3112
|
+
|
|
3113
|
+
body.presenting .cm-md-atxheading3,
|
|
3114
|
+
body.slides-printing .cm-md-atxheading3 {
|
|
3115
|
+
font-family: var(--slide-title-font, var(--slide-serif, Georgia, serif));
|
|
3116
|
+
font-size: 1.5em;
|
|
3117
|
+
font-weight: var(--slide-subhead-weight, 600);
|
|
3118
|
+
line-height: 1.4;
|
|
3119
|
+
border-bottom: none;
|
|
3120
|
+
padding-top: 0;
|
|
3121
|
+
margin-bottom: 0.35em;
|
|
3122
|
+
}
|
|
3123
|
+
|
|
3124
|
+
body.presenting .cm-md-atxheading4,
|
|
3125
|
+
body.slides-printing .cm-md-atxheading4 {
|
|
3126
|
+
font-size: 1.15em;
|
|
3127
|
+
font-weight: var(--slide-subhead-weight, 600);
|
|
3128
|
+
border-bottom: none;
|
|
3129
|
+
padding-top: 0;
|
|
3130
|
+
margin-bottom: 0.3em;
|
|
3131
|
+
}
|
|
3132
|
+
|
|
3133
|
+
/* 页标题:一页的第一个标题,h1 与 h2 同权。 */
|
|
3134
|
+
body.presenting .cm-md-page-title,
|
|
3135
|
+
body.slides-printing .cm-md-page-title {
|
|
3136
|
+
font-family: var(--slide-title-font, var(--slide-serif, Georgia, serif));
|
|
3137
|
+
font-size: var(--slide-title-size, 4.2em);
|
|
3138
|
+
font-weight: var(--slide-title-weight, 700);
|
|
3139
|
+
line-height: var(--slide-title-line-height, 1.08);
|
|
3140
|
+
letter-spacing: var(--slide-title-tracking, -0.01em);
|
|
3141
|
+
border-bottom: none;
|
|
3142
|
+
padding-top: 0;
|
|
3143
|
+
margin: 0 0 0.35em;
|
|
3144
|
+
}
|
|
3145
|
+
|
|
3146
|
+
/* kicker:标题上方的等宽小字,文字来自行属性,画成标题行的一部分。 */
|
|
3147
|
+
body.presenting .cm-md-page-title[data-slide-kicker]::before,
|
|
3148
|
+
body.slides-printing .cm-md-page-title[data-slide-kicker]::before {
|
|
3149
|
+
content: attr(data-slide-kicker);
|
|
3150
|
+
display: block;
|
|
3151
|
+
margin-bottom: 0.9em;
|
|
3152
|
+
font-family: var(--slide-mono, ui-monospace, Consolas, monospace);
|
|
3153
|
+
font-size: var(--slide-kicker-size, clamp(11px, 0.72vw, 15px));
|
|
3154
|
+
font-weight: 500;
|
|
3155
|
+
letter-spacing: var(--slide-kicker-tracking, 0.3em);
|
|
3156
|
+
line-height: 1.4;
|
|
3157
|
+
text-transform: var(--slide-kicker-transform, uppercase);
|
|
3158
|
+
color: var(--text-muted);
|
|
3159
|
+
}
|
|
3160
|
+
|
|
3161
|
+
/* 导语:标题后的第一段,压淡放大,和正文拉开层次。 */
|
|
3162
|
+
body.presenting .cm-md-page-lead,
|
|
3163
|
+
body.slides-printing .cm-md-page-lead {
|
|
3164
|
+
font-size: var(--slide-lead-size, 1.25em);
|
|
3165
|
+
line-height: 1.55;
|
|
3166
|
+
color: var(--text-secondary, var(--text-muted));
|
|
3167
|
+
margin-top: 0;
|
|
3168
|
+
margin-bottom: 1.4em;
|
|
3169
|
+
max-width: 68%;
|
|
3170
|
+
}
|
|
3171
|
+
|
|
3172
|
+
/* 默认页 = 文章版式:没写 slide 块的页自动走这里,标题收小、正文压紧,
|
|
3173
|
+
* 行宽收一收,一页能装下更多段落。 */
|
|
3174
|
+
body.presenting .cm-line.cm-md-page-default,
|
|
3175
|
+
body.slides-printing .cm-line.cm-md-page-default {
|
|
3176
|
+
font-size: 0.95em;
|
|
3177
|
+
line-height: 1.8;
|
|
3178
|
+
max-width: 82%;
|
|
3179
|
+
}
|
|
3180
|
+
|
|
3181
|
+
body.presenting .cm-md-page-default.cm-md-page-title,
|
|
3182
|
+
body.slides-printing .cm-md-page-default.cm-md-page-title {
|
|
3183
|
+
font-size: 3.4em;
|
|
3184
|
+
line-height: 1.16;
|
|
3185
|
+
letter-spacing: -0.015em;
|
|
3186
|
+
max-width: 13em;
|
|
3187
|
+
margin-bottom: 0.45em;
|
|
3188
|
+
}
|
|
3189
|
+
|
|
3190
|
+
body.presenting .cm-md-page-default.cm-md-page-lead,
|
|
3191
|
+
body.slides-printing .cm-md-page-default.cm-md-page-lead {
|
|
3192
|
+
font-size: 1.05em;
|
|
3193
|
+
line-height: 1.7;
|
|
3194
|
+
max-width: 82%;
|
|
3195
|
+
margin-bottom: 1em;
|
|
3196
|
+
}
|
|
3197
|
+
|
|
3198
|
+
/* 行高放映与导出同值:不一致会让同一份稿子在屏幕上和纸上换行位置不同。 */
|
|
3199
|
+
body.presenting #editor .cm-content,
|
|
3200
|
+
body.slides-printing #editor .cm-content {
|
|
3201
|
+
line-height: 1.7;
|
|
3202
|
+
}
|
|
3203
|
+
|
|
3204
|
+
body.presenting .cm-md-li,
|
|
3205
|
+
body.slides-printing .cm-md-li {
|
|
3206
|
+
margin-top: 0.45em;
|
|
3207
|
+
margin-bottom: 0.45em;
|
|
3208
|
+
padding-left: 0.3em;
|
|
3209
|
+
}
|
|
3210
|
+
|
|
3211
|
+
@keyframes slide-rise {
|
|
3212
|
+
from {
|
|
3213
|
+
opacity: 0;
|
|
3214
|
+
transform: translateY(1em);
|
|
3215
|
+
}
|
|
3216
|
+
to {
|
|
3217
|
+
opacity: 1;
|
|
3218
|
+
transform: none;
|
|
3219
|
+
}
|
|
3220
|
+
}
|
|
3221
|
+
|
|
3222
|
+
/* 容器级版式(整页 flex 居中或分栏)里,页首安全区要交还给布局本身:
|
|
3223
|
+
* 指令行改成真正不占位(display:none),page-start 的上内距归零——否则
|
|
3224
|
+
* 那截安全区会被 flex 当成一项内容,整页内容被推得偏下。这些页靠 flex
|
|
3225
|
+
* 自己居中,不需要页首安全区。 */
|
|
3226
|
+
body.presenting #editor[data-slide-layout='cover'] .cm-md-slide-directive,
|
|
3227
|
+
body.presenting #editor[data-slide-layout='section'] .cm-md-slide-directive,
|
|
3228
|
+
body.presenting #editor[data-slide-layout='closing'] .cm-md-slide-directive,
|
|
3229
|
+
body.presenting #editor[data-slide-layout='two-col'] .cm-md-slide-directive {
|
|
3230
|
+
display: none;
|
|
3231
|
+
}
|
|
3232
|
+
|
|
3233
|
+
body.presenting #editor[data-slide-layout='cover'] .cm-md-page-start,
|
|
3234
|
+
body.presenting #editor[data-slide-layout='section'] .cm-md-page-start,
|
|
3235
|
+
body.presenting #editor[data-slide-layout='closing'] .cm-md-page-start,
|
|
3236
|
+
body.presenting #editor[data-slide-layout='two-col'] .cm-md-page-start {
|
|
3237
|
+
padding-top: 0;
|
|
3238
|
+
}
|
|
3239
|
+
|
|
3240
|
+
/* 导出是流式分纸、没有容器级的 flex 居中,封面/章节/收束的整页居中由
|
|
3241
|
+
* slides-export.ts 在页前撑空白完成(spacer),页首安全区在这里归零——否则
|
|
3242
|
+
* 那截 padding 会叠在 spacer 之上,内容被推得偏下。双栏页不居中,保留安全区。 */
|
|
3243
|
+
body.slides-printing .cm-md-slide-cover.cm-md-page-start,
|
|
3244
|
+
body.slides-printing .cm-md-slide-section.cm-md-page-start,
|
|
3245
|
+
body.slides-printing .cm-md-slide-closing.cm-md-page-start {
|
|
3246
|
+
padding-top: 0 !important;
|
|
3247
|
+
}
|
|
3248
|
+
|
|
3249
|
+
/* ════ cover · 主视觉封面(dsh-ppt: cover.hero)════
|
|
3250
|
+
*
|
|
3251
|
+
* 约定:h1 主标题,h2 副标题,标题后的第一段当导语,kicker 写在页头块里。
|
|
3252
|
+
* 杂志封面式左对齐,chrome(logo 与报告名)保留在页顶,不再整条淡出。 */
|
|
3253
|
+
body.presenting #editor[data-slide-layout='cover'] .cm-content {
|
|
3254
|
+
display: flex;
|
|
3255
|
+
flex-direction: column;
|
|
3256
|
+
justify-content: center;
|
|
3257
|
+
min-height: 92vh;
|
|
3258
|
+
text-align: var(--slide-cover-text-align, left);
|
|
3259
|
+
}
|
|
3260
|
+
|
|
3261
|
+
body.presenting #editor[data-slide-layout='cover'] .cm-md-page-title {
|
|
3262
|
+
font-size: var(--slide-cover-title-size, 6.8em);
|
|
3263
|
+
line-height: var(--slide-cover-title-line-height, 0.98);
|
|
3264
|
+
letter-spacing: var(--slide-cover-title-tracking, -0.02em);
|
|
3265
|
+
max-width: 14em;
|
|
3266
|
+
animation: slide-rise 0.7s ease-out both;
|
|
3267
|
+
}
|
|
3268
|
+
|
|
3269
|
+
body.presenting #editor[data-slide-layout='cover'] .cm-md-atxheading2,
|
|
3270
|
+
body.presenting #editor[data-slide-layout='cover'] .cm-md-atxheading3 {
|
|
3271
|
+
font-family: var(--slide-title-font, var(--slide-serif, Georgia, serif));
|
|
3272
|
+
font-size: 2.2em;
|
|
3273
|
+
font-weight: 400;
|
|
3274
|
+
line-height: 1.25;
|
|
3275
|
+
color: var(--text-muted);
|
|
3276
|
+
border-bottom: none;
|
|
3277
|
+
margin-bottom: 0.5em;
|
|
3278
|
+
animation: slide-rise 0.7s ease-out both;
|
|
3279
|
+
}
|
|
3280
|
+
|
|
3281
|
+
body.presenting #editor[data-slide-layout='cover'] .cm-md-page-lead {
|
|
3282
|
+
max-width: 60%;
|
|
3283
|
+
margin-bottom: 1.2em;
|
|
3284
|
+
margin-inline: var(--slide-cover-lead-inline, 0);
|
|
3285
|
+
}
|
|
3286
|
+
|
|
3287
|
+
/* 导出:封面是普通块流(没有容器级的 flex 居中),但字号阶梯与放映同一份令牌,
|
|
3288
|
+
不再按纸上高度另收一档——纸面与 1920×1080 的设计空间是一块地方。 */
|
|
3289
|
+
body.slides-printing .cm-md-slide-cover.cm-md-page-title {
|
|
3290
|
+
font-size: var(--slide-cover-title-size, 6.8em);
|
|
3291
|
+
line-height: var(--slide-cover-title-line-height, 0.98);
|
|
3292
|
+
letter-spacing: var(--slide-cover-title-tracking, -0.02em);
|
|
3293
|
+
max-width: 14em;
|
|
3294
|
+
}
|
|
3295
|
+
|
|
3296
|
+
body.slides-printing .cm-md-slide-cover.cm-md-atxheading2,
|
|
3297
|
+
body.slides-printing .cm-md-slide-cover.cm-md-atxheading3 {
|
|
3298
|
+
font-weight: 400;
|
|
3299
|
+
color: var(--text-muted);
|
|
3300
|
+
}
|
|
3301
|
+
|
|
3302
|
+
body.slides-printing .cm-md-slide-cover.cm-md-page-lead {
|
|
3303
|
+
max-width: 60%;
|
|
3304
|
+
}
|
|
3305
|
+
|
|
3306
|
+
/* ════ section · 章节陈述(dsh-ppt: section.statement)════
|
|
3307
|
+
*
|
|
3308
|
+
* 约定:一个 h1(或 h2)作章节判断,标题后一段一句说明,剩下的交给留白。 */
|
|
3309
|
+
body.presenting #editor[data-slide-layout='section'] .cm-content {
|
|
3310
|
+
display: flex;
|
|
3311
|
+
flex-direction: column;
|
|
3312
|
+
justify-content: center;
|
|
3313
|
+
min-height: 92vh;
|
|
3314
|
+
}
|
|
3315
|
+
|
|
3316
|
+
body.presenting #editor[data-slide-layout='section'] .cm-md-page-title {
|
|
3317
|
+
font-size: var(--slide-section-title-size, 5.2em);
|
|
3318
|
+
line-height: 1.02;
|
|
3319
|
+
max-width: 14em;
|
|
3320
|
+
animation: slide-rise 0.6s ease-out both;
|
|
3321
|
+
}
|
|
3322
|
+
|
|
3323
|
+
body.presenting #editor[data-slide-layout='section'] .cm-md-page-lead {
|
|
3324
|
+
max-width: 55%;
|
|
3325
|
+
}
|
|
3326
|
+
|
|
3327
|
+
body.slides-printing .cm-md-slide-section.cm-md-page-title {
|
|
3328
|
+
font-size: var(--slide-section-title-size, 5.2em);
|
|
3329
|
+
line-height: 1.02;
|
|
3330
|
+
max-width: 14em;
|
|
3331
|
+
padding-bottom: 0.3em;
|
|
3332
|
+
}
|
|
3333
|
+
|
|
3334
|
+
/* ════ agenda · 结构列表(dsh-ppt: agenda.simple)════
|
|
3335
|
+
*
|
|
3336
|
+
* 约定:一个有序列表(1. 2. 3.),每项一句话。整页宽的条目行,顶部细线分隔,
|
|
3337
|
+
* 序号用衬线强调色放大——目录页的经典画法。 */
|
|
3338
|
+
body.presenting .cm-md-slide-agenda.cm-md-li,
|
|
3339
|
+
body.slides-printing .cm-md-slide-agenda.cm-md-li {
|
|
3340
|
+
font-size: 1.2em;
|
|
3341
|
+
margin: 0;
|
|
3342
|
+
padding-top: 1em;
|
|
3343
|
+
padding-bottom: 1em;
|
|
3344
|
+
border-top: 1px solid var(--border-color);
|
|
3345
|
+
list-style: none;
|
|
3346
|
+
}
|
|
3347
|
+
|
|
3348
|
+
body.presenting .cm-md-slide-agenda .cm-md-listmark,
|
|
3349
|
+
body.slides-printing .cm-md-slide-agenda .cm-md-listmark {
|
|
3350
|
+
font-family: var(--slide-title-font, var(--slide-serif, Georgia, serif));
|
|
3351
|
+
font-size: 1.5em;
|
|
3352
|
+
font-weight: 700;
|
|
3353
|
+
color: var(--pele-accent);
|
|
3354
|
+
margin-right: 0.5em;
|
|
3355
|
+
font-feature-settings: 'tnum';
|
|
3356
|
+
}
|
|
3357
|
+
|
|
3358
|
+
/* ════ kpi · 关键概览(dsh-ppt: overview.kpi)════
|
|
3359
|
+
*
|
|
3360
|
+
* 约定:一个列表,2-6 项,每项 `**数字** 说明`。参考模板的 stat-card:
|
|
3361
|
+
* 一根细线定标,大数字用衬线等宽(tnum),说明压到次要色。 */
|
|
3362
|
+
body.presenting .cm-md-slide-kpi.cm-md-li,
|
|
3363
|
+
body.slides-printing .cm-md-slide-kpi.cm-md-li {
|
|
3364
|
+
display: inline-block;
|
|
3365
|
+
width: 31%;
|
|
3366
|
+
margin: 0 1.2% 1.4em 0;
|
|
3367
|
+
padding: 1em 0.9em 1.1em;
|
|
3368
|
+
border-top: 1px solid currentColor;
|
|
3369
|
+
border-color: color-mix(in srgb, currentColor 32%, transparent);
|
|
3370
|
+
vertical-align: top;
|
|
3371
|
+
text-align: left;
|
|
3372
|
+
list-style: none;
|
|
3373
|
+
font-size: 0.92em;
|
|
3374
|
+
line-height: 1.55;
|
|
3375
|
+
}
|
|
3376
|
+
|
|
3377
|
+
/* 带 #editor .cm-content 提权:主题常在 `#editor .cm-content .cm-md-listmark`
|
|
3378
|
+
* 上写 display,单靠 body.presenting 的权重压不住(kpi/timeline/matrix/closing
|
|
3379
|
+
* 四处同此,见 steps 处的说明)。 */
|
|
3380
|
+
body.presenting #editor .cm-content .cm-md-slide-kpi .cm-md-listmark,
|
|
3381
|
+
body.slides-printing #editor .cm-content .cm-md-slide-kpi .cm-md-listmark {
|
|
3382
|
+
display: none;
|
|
3383
|
+
}
|
|
3384
|
+
|
|
3385
|
+
body.presenting .cm-md-slide-kpi .cm-md-strong,
|
|
3386
|
+
body.slides-printing .cm-md-slide-kpi .cm-md-strong {
|
|
3387
|
+
display: block;
|
|
3388
|
+
font-family: var(--slide-title-font, var(--slide-serif, Georgia, serif));
|
|
3389
|
+
font-size: var(--slide-kpi-number-size, 3.8em);
|
|
3390
|
+
font-weight: 800;
|
|
3391
|
+
line-height: 1.05;
|
|
3392
|
+
letter-spacing: -0.02em;
|
|
3393
|
+
color: var(--text-color);
|
|
3394
|
+
font-feature-settings: 'tnum';
|
|
3395
|
+
margin-bottom: 0.12em;
|
|
3396
|
+
}
|
|
3397
|
+
|
|
3398
|
+
body.presenting .cm-md-slide-kpi,
|
|
3399
|
+
body.slides-printing .cm-md-slide-kpi {
|
|
3400
|
+
color: var(--text-secondary);
|
|
3401
|
+
}
|
|
3402
|
+
|
|
3403
|
+
/* ════ timeline · 历程时间轴(dsh-ppt: history.timeline)════
|
|
3404
|
+
*
|
|
3405
|
+
* 约定:一个列表,3-6 项,每项 `**阶段名** 说明`。左侧细轴线加圆点。 */
|
|
3406
|
+
body.presenting .cm-md-slide-timeline.cm-md-li,
|
|
3407
|
+
body.slides-printing .cm-md-slide-timeline.cm-md-li {
|
|
3408
|
+
position: relative;
|
|
3409
|
+
margin-left: 0.6em;
|
|
3410
|
+
padding-left: 2.2em;
|
|
3411
|
+
border-left: 1px solid var(--border-color);
|
|
3412
|
+
padding-bottom: 1.4em;
|
|
3413
|
+
list-style: none;
|
|
3414
|
+
}
|
|
3415
|
+
|
|
3416
|
+
body.presenting #editor .cm-content .cm-md-slide-timeline .cm-md-listmark,
|
|
3417
|
+
body.slides-printing #editor .cm-content .cm-md-slide-timeline .cm-md-listmark {
|
|
3418
|
+
display: none;
|
|
3419
|
+
}
|
|
3420
|
+
|
|
3421
|
+
body.presenting .cm-md-slide-timeline.cm-md-li::before,
|
|
3422
|
+
body.slides-printing .cm-md-slide-timeline.cm-md-li::before {
|
|
3423
|
+
content: '';
|
|
3424
|
+
position: absolute;
|
|
3425
|
+
left: -6px;
|
|
3426
|
+
top: 0.4em;
|
|
3427
|
+
width: 11px;
|
|
3428
|
+
height: 11px;
|
|
3429
|
+
border-radius: 50%;
|
|
3430
|
+
background: var(--pele-accent);
|
|
3431
|
+
}
|
|
3432
|
+
|
|
3433
|
+
body.presenting .cm-md-slide-timeline,
|
|
3434
|
+
body.slides-printing .cm-md-slide-timeline {
|
|
3435
|
+
color: var(--text-secondary);
|
|
3436
|
+
}
|
|
3437
|
+
|
|
3438
|
+
body.presenting .cm-md-slide-timeline .cm-md-strong,
|
|
3439
|
+
body.slides-printing .cm-md-slide-timeline .cm-md-strong {
|
|
3440
|
+
display: block;
|
|
3441
|
+
font-family: var(--slide-title-font, var(--slide-serif, Georgia, serif));
|
|
3442
|
+
font-size: 1.2em;
|
|
3443
|
+
color: var(--text-color);
|
|
3444
|
+
}
|
|
3445
|
+
|
|
3446
|
+
/* ════ steps · 步骤流程(dsh-ppt: process.steps)════
|
|
3447
|
+
*
|
|
3448
|
+
* 约定:一个列表,3-5 项,每项 `**步骤名** 说明`。整行时间轴式步骤条:
|
|
3449
|
+
* 左侧强调线,步骤名用描边胶囊,说明占满剩余宽度。不再用三列窄栏,
|
|
3450
|
+
* 避免长句被挤成两三行,也避免浅色主题下圆号与文字对比度不足。 */
|
|
3451
|
+
body.presenting .cm-md-slide-steps.cm-md-li,
|
|
3452
|
+
body.slides-printing .cm-md-slide-steps.cm-md-li {
|
|
3453
|
+
display: flex;
|
|
3454
|
+
align-items: flex-start;
|
|
3455
|
+
gap: 1em;
|
|
3456
|
+
width: 100%;
|
|
3457
|
+
margin: 0 0 1em;
|
|
3458
|
+
padding: 0.75em 0 0.75em 1.1em;
|
|
3459
|
+
border-left: 3px solid var(--pele-accent);
|
|
3460
|
+
border-bottom: 1px solid var(--border-color);
|
|
3461
|
+
list-style: none;
|
|
3462
|
+
text-align: left;
|
|
3463
|
+
}
|
|
3464
|
+
|
|
3465
|
+
/* 序号由主题的列表标记提供,steps 用步骤名胶囊代替,避免两个编号并排。
|
|
3466
|
+
* 这里带 #editor .cm-content:主题常在 `#editor .cm-content .cm-md-listmark`
|
|
3467
|
+
* 上写 display,单靠 body.presenting 的权重压不住。 */
|
|
3468
|
+
body.presenting #editor .cm-content .cm-md-slide-steps .cm-md-listmark,
|
|
3469
|
+
body.slides-printing #editor .cm-content .cm-md-slide-steps .cm-md-listmark {
|
|
3470
|
+
display: none;
|
|
3471
|
+
}
|
|
3472
|
+
|
|
3473
|
+
/* 步骤名做成描边胶囊:透明底 + 强调色描边 + 强调色文字,全圆外形。
|
|
3474
|
+
* 细线代替色块是这套版式的设计语言;胶囊文字直接用强调色,
|
|
3475
|
+
* 在深浅主题上都成立(强调色本身就对底色有足够对比)。
|
|
3476
|
+
* 主题的 `#editor .cm-content .cm-md-strong` 可能给加粗另配色,
|
|
3477
|
+
* 这里必须带 #editor .cm-content 才能把颜色收回强调色。 */
|
|
3478
|
+
body.presenting #editor .cm-content .cm-md-slide-steps .cm-md-strong,
|
|
3479
|
+
body.slides-printing #editor .cm-content .cm-md-slide-steps .cm-md-strong {
|
|
3480
|
+
display: inline-flex;
|
|
3481
|
+
align-items: center;
|
|
3482
|
+
justify-content: center;
|
|
3483
|
+
flex: 0 0 auto;
|
|
3484
|
+
min-width: 2.4em;
|
|
3485
|
+
padding: 0.22em 0.9em;
|
|
3486
|
+
border: 1.5px solid var(--pele-accent);
|
|
3487
|
+
border-radius: 999px;
|
|
3488
|
+
background: transparent;
|
|
3489
|
+
color: var(--pele-accent);
|
|
3490
|
+
font-family: var(--slide-title-font, var(--slide-serif, Georgia, serif));
|
|
3491
|
+
font-size: 0.95em;
|
|
3492
|
+
line-height: 1.25;
|
|
3493
|
+
white-space: nowrap;
|
|
3494
|
+
}
|
|
3495
|
+
|
|
3496
|
+
/* ════ matrix · 主题矩阵(dsh-ppt: product.matrix)════
|
|
3497
|
+
*
|
|
3498
|
+
* 约定:一个列表,3-8 项,每项 `**主题名** 说明`。描边卡片网格。 */
|
|
3499
|
+
body.presenting .cm-md-slide-matrix.cm-md-li,
|
|
3500
|
+
body.slides-printing .cm-md-slide-matrix.cm-md-li {
|
|
3501
|
+
display: inline-block;
|
|
3502
|
+
width: 30%;
|
|
3503
|
+
margin: 0 1.5% 1.5em 0;
|
|
3504
|
+
padding: 1.1em 1.1em 1em;
|
|
3505
|
+
border: 1px solid var(--border-color);
|
|
3506
|
+
border-radius: var(--pele-radius, 8px);
|
|
3507
|
+
vertical-align: top;
|
|
3508
|
+
list-style: none;
|
|
3509
|
+
}
|
|
3510
|
+
|
|
3511
|
+
body.presenting #editor .cm-content .cm-md-slide-matrix .cm-md-listmark,
|
|
3512
|
+
body.slides-printing #editor .cm-content .cm-md-slide-matrix .cm-md-listmark {
|
|
3513
|
+
display: none;
|
|
3514
|
+
}
|
|
3515
|
+
|
|
3516
|
+
body.presenting .cm-md-slide-matrix .cm-md-strong,
|
|
3517
|
+
body.slides-printing .cm-md-slide-matrix .cm-md-strong {
|
|
3518
|
+
display: block;
|
|
3519
|
+
font-family: var(--slide-title-font, var(--slide-serif, Georgia, serif));
|
|
3520
|
+
font-size: 1.15em;
|
|
3521
|
+
color: var(--pele-accent);
|
|
3522
|
+
margin-bottom: 0.3em;
|
|
3523
|
+
}
|
|
3524
|
+
|
|
3525
|
+
body.presenting .cm-md-slide-matrix,
|
|
3526
|
+
body.slides-printing .cm-md-slide-matrix {
|
|
3527
|
+
color: var(--text-secondary);
|
|
3528
|
+
}
|
|
3529
|
+
|
|
3530
|
+
/* ════ two-col · 双栏对比(dsh-ppt: comparison.two-column)════
|
|
3531
|
+
*
|
|
3532
|
+
* 约定:放映时整页分两栏(data-slide-layout 选容器),中缝一根细线;导出是
|
|
3533
|
+
* 流式分纸,退化为行级 inline-block:页首行(通常是标题)保持 block 占全宽,
|
|
3534
|
+
* 其余行两条一排——break-before: page 依赖 block 级的页首行,不能一起 inline。 */
|
|
3535
|
+
body.presenting #editor[data-slide-layout='two-col'] .cm-content {
|
|
3536
|
+
column-count: 2;
|
|
3537
|
+
column-gap: 4em;
|
|
3538
|
+
column-rule: 1px solid var(--border-color);
|
|
3539
|
+
height: 88vh;
|
|
3540
|
+
column-fill: auto;
|
|
3541
|
+
}
|
|
3542
|
+
|
|
3543
|
+
body.slides-printing .cm-md-slide-two-col:not(.cm-md-page-start) {
|
|
3544
|
+
display: inline-block;
|
|
3545
|
+
width: 47.5%;
|
|
3546
|
+
vertical-align: top;
|
|
3547
|
+
}
|
|
3548
|
+
|
|
3549
|
+
/* ════ figure · 图表 / 图片独立页 ════
|
|
3550
|
+
*
|
|
3551
|
+
* 约定:标题与 kpi 页同一档(标准 4.2em、左对齐),图占画面约七成并居中,
|
|
3552
|
+
* 不再铺满整屏;最高 66vh,避免压到页脚。 */
|
|
3553
|
+
|
|
3554
|
+
/* 放映与导出都是「看图」场景,图表的缩放控件(.pele-zoom)没有意义,
|
|
3555
|
+
* 一律藏掉——普通文章打印(body.paper)在 print-layout.ts 已经这么做了。 */
|
|
3556
|
+
body.presenting .pele-zoom,
|
|
3557
|
+
body.slides-printing .pele-zoom {
|
|
3558
|
+
display: none !important;
|
|
3559
|
+
}
|
|
3560
|
+
|
|
3561
|
+
body.presenting #editor[data-slide-layout='figure'] .cm-md-page-lead {
|
|
3562
|
+
margin-bottom: 0.6em;
|
|
3563
|
+
}
|
|
3564
|
+
|
|
3565
|
+
body.presenting #editor[data-slide-layout='figure'] .cm-md-mermaid,
|
|
3566
|
+
body.presenting #editor[data-slide-layout='figure'] .cm-md-image {
|
|
3567
|
+
width: 70%;
|
|
3568
|
+
max-width: 70%;
|
|
3569
|
+
padding: 0;
|
|
3570
|
+
margin: 0 auto;
|
|
3571
|
+
}
|
|
3572
|
+
|
|
3573
|
+
body.presenting #editor[data-slide-layout='figure'] .cm-md-mermaid svg,
|
|
3574
|
+
body.presenting #editor[data-slide-layout='figure'] .cm-md-image img {
|
|
3575
|
+
width: 100%;
|
|
3576
|
+
max-width: 100%;
|
|
3577
|
+
max-height: var(--slide-figure-max-h);
|
|
3578
|
+
height: auto;
|
|
3579
|
+
}
|
|
3580
|
+
|
|
3581
|
+
/* 导出:标题/导语走标准页角色,图的高度上限与放映同一档(66vh)。纸面 1080 高,
|
|
3582
|
+
vh 在纸面与在 1920×1080 的窗口里解出同一个数。
|
|
3583
|
+
图是块级 widget,`cm-md-slide-figure` 由 slideshow 的 tagBlockWidgets 补在同一个
|
|
3584
|
+
元素上,所以这里必须写紧凑选择器(.a.b):原来的后代写法选不中它,图会退回
|
|
3585
|
+
固有尺寸,和放映的 70% 宽不是一个大小。 */
|
|
3586
|
+
body.slides-printing .cm-md-slide-figure.cm-md-page-lead {
|
|
3587
|
+
margin-bottom: 0.6em;
|
|
3588
|
+
}
|
|
3589
|
+
|
|
3590
|
+
body.slides-printing .cm-md-slide-figure.cm-md-mermaid,
|
|
3591
|
+
body.slides-printing .cm-md-slide-figure .cm-md-mermaid,
|
|
3592
|
+
body.slides-printing .cm-md-slide-figure.cm-md-image,
|
|
3593
|
+
body.slides-printing .cm-md-slide-figure .cm-md-image {
|
|
3594
|
+
width: 70%;
|
|
3595
|
+
max-width: 70%;
|
|
3596
|
+
padding: 0;
|
|
3597
|
+
margin: 0 auto;
|
|
3598
|
+
}
|
|
3599
|
+
|
|
3600
|
+
/* 高度上限要带 #editor:图那条通用规则是 (1,1,2),不带 id 的 figure 规则
|
|
3601
|
+
压不过它,66vh 会被 72vh 顶掉。 */
|
|
3602
|
+
body.slides-printing #editor .cm-md-slide-figure.cm-md-mermaid svg,
|
|
3603
|
+
body.slides-printing #editor .cm-md-slide-figure .cm-md-mermaid svg,
|
|
3604
|
+
body.slides-printing #editor .cm-md-slide-figure.cm-md-image img,
|
|
3605
|
+
body.slides-printing #editor .cm-md-slide-figure .cm-md-image img {
|
|
3606
|
+
width: 100%;
|
|
3607
|
+
max-height: var(--slide-figure-max-h);
|
|
3608
|
+
height: auto;
|
|
3609
|
+
}
|
|
3610
|
+
|
|
3611
|
+
/* ════ quote · 引言页 ════
|
|
3612
|
+
*
|
|
3613
|
+
* 约定:一段引用(> …),引用后一行普通文字可作署名(右对齐)。
|
|
3614
|
+
* 大引号加在紧跟指令行的第一个引用行上;多段引用只出一次引号。 */
|
|
3615
|
+
body.presenting .cm-md-slide-quote .cm-md-blockquote,
|
|
3616
|
+
body.slides-printing .cm-md-slide-quote .cm-md-blockquote {
|
|
3617
|
+
border-left: none;
|
|
3618
|
+
text-align: left;
|
|
3619
|
+
font-family: var(--slide-title-font, var(--slide-serif, Georgia, serif));
|
|
3620
|
+
font-size: var(--slide-quote-size, 2.4em);
|
|
3621
|
+
font-style: italic;
|
|
3622
|
+
line-height: 1.45;
|
|
3623
|
+
max-width: 78%;
|
|
3624
|
+
color: var(--text-secondary);
|
|
3625
|
+
}
|
|
3626
|
+
|
|
3627
|
+
body.presenting .cm-md-slide-directive + .cm-md-blockquote.cm-md-slide-quote::before,
|
|
3628
|
+
body.slides-printing .cm-md-slide-directive + .cm-md-blockquote.cm-md-slide-quote::before {
|
|
3629
|
+
content: '\201C';
|
|
3630
|
+
display: block;
|
|
3631
|
+
height: 0.55em;
|
|
3632
|
+
font-size: 3.2em;
|
|
3633
|
+
font-style: normal;
|
|
3634
|
+
line-height: 0.6;
|
|
3635
|
+
color: var(--pele-accent);
|
|
3636
|
+
}
|
|
3637
|
+
|
|
3638
|
+
/* ════ closing · 结论收束(dsh-ppt: closing.summary)════
|
|
3639
|
+
*
|
|
3640
|
+
* 约定:一句 h1/h2 收束判断,加一个行动清单。整体压淡,
|
|
3641
|
+
* 清单项换 ▸ 前缀(原列表符号藏掉)。 */
|
|
3642
|
+
body.presenting #editor[data-slide-layout='closing'] .cm-content {
|
|
3643
|
+
display: flex;
|
|
3644
|
+
flex-direction: column;
|
|
3645
|
+
justify-content: center;
|
|
3646
|
+
min-height: 92vh;
|
|
3647
|
+
}
|
|
3648
|
+
|
|
3649
|
+
body.presenting #editor[data-slide-layout='closing'] .cm-md-page-title {
|
|
3650
|
+
font-size: var(--slide-closing-title-size, 4.2em);
|
|
3651
|
+
line-height: 1.1;
|
|
3652
|
+
max-width: 16em;
|
|
3653
|
+
animation: slide-rise 0.6s ease-out both;
|
|
3654
|
+
}
|
|
3655
|
+
|
|
3656
|
+
body.presenting #editor[data-slide-layout='closing'] .cm-content,
|
|
3657
|
+
body.slides-printing .cm-md-slide-closing {
|
|
3658
|
+
color: var(--text-muted);
|
|
3659
|
+
}
|
|
3660
|
+
|
|
3661
|
+
body.presenting .cm-md-slide-closing.cm-md-li,
|
|
3662
|
+
body.slides-printing .cm-md-slide-closing.cm-md-li {
|
|
3663
|
+
list-style: none;
|
|
3664
|
+
}
|
|
3665
|
+
|
|
3666
|
+
body.presenting #editor .cm-content .cm-md-slide-closing .cm-md-listmark,
|
|
3667
|
+
body.slides-printing #editor .cm-content .cm-md-slide-closing .cm-md-listmark {
|
|
3668
|
+
display: none;
|
|
3669
|
+
}
|
|
3670
|
+
|
|
3671
|
+
body.presenting .cm-md-slide-closing.cm-md-li::before,
|
|
3672
|
+
body.slides-printing .cm-md-slide-closing.cm-md-li::before {
|
|
3673
|
+
content: '\25B8 ';
|
|
3674
|
+
color: var(--pele-accent);
|
|
3675
|
+
}
|
|
3676
|
+
|
|
3677
|
+
body.slides-printing .cm-md-slide-closing.cm-md-page-title {
|
|
3678
|
+
font-size: var(--slide-closing-title-size, 4.2em);
|
|
3679
|
+
line-height: 1.1;
|
|
3680
|
+
max-width: 16em;
|
|
3681
|
+
}
|
|
3682
|
+
|
|
3683
|
+
/* ════ 内容元素:列表 / 强调 / 代码 / 引用 / 表格 / 图片 ════
|
|
3684
|
+
*
|
|
3685
|
+
* 这些元素在幻灯片里是「顺带出现」的,画法要按 PPT 的读法走:符号收进强调色、
|
|
3686
|
+
* 边框收掉、字号按元素性质缩放。版式自己的专用画法(kpi 的大数字、matrix 的
|
|
3687
|
+
* 卡名、closing 的 ▸)选择器多一个 cm-md-slide-* 类,权重更高,不受这里影响。 */
|
|
3688
|
+
|
|
3689
|
+
/* 列表符号:强调色、稍收紧,与文字之间留一点气。 */
|
|
3690
|
+
body.presenting .cm-md-listmark,
|
|
3691
|
+
body.slides-printing .cm-md-listmark {
|
|
3692
|
+
color: var(--pele-accent);
|
|
3693
|
+
font-weight: 600;
|
|
3694
|
+
padding-right: 0.15em;
|
|
3695
|
+
}
|
|
3696
|
+
|
|
3697
|
+
/* 正文里的加粗与斜体都借强调色与衬线:演讲时观众一眼抓到关键词。 */
|
|
3698
|
+
body.presenting .cm-md-strong,
|
|
3699
|
+
body.slides-printing .cm-md-strong {
|
|
3700
|
+
color: var(--pele-accent);
|
|
3701
|
+
}
|
|
3702
|
+
|
|
3703
|
+
body.presenting .cm-md-em,
|
|
3704
|
+
body.slides-printing .cm-md-em {
|
|
3705
|
+
font-family: var(--slide-title-font, var(--slide-serif, Georgia, serif));
|
|
3706
|
+
}
|
|
3707
|
+
|
|
3708
|
+
/* 行内代码:缩到正文的 0.86,去掉文档式边框,用极淡的同色底。 */
|
|
3709
|
+
body.presenting .cm-md-inlinecode,
|
|
3710
|
+
body.slides-printing .cm-md-inlinecode {
|
|
3711
|
+
font-size: 0.86em;
|
|
3712
|
+
padding: 0.08em 0.34em;
|
|
3713
|
+
border: none;
|
|
3714
|
+
border-radius: 4px;
|
|
3715
|
+
background: color-mix(in srgb, currentColor 9%, transparent);
|
|
3716
|
+
}
|
|
3717
|
+
|
|
3718
|
+
/* 代码块:字号再小一档,内距放宽,圆角收边;放映一律折行,横向滚动在
|
|
3719
|
+
* 幻灯片上等于内容被切掉。
|
|
3720
|
+
* 纵向内距必须是 0:CM6 给代码块每一行都打 cm-md-codeblock,纵向 padding
|
|
3721
|
+
* 会逐行累加(行距撑成 2em、导出直接跨页),留白交给行高与首尾圆角。 */
|
|
3722
|
+
body.presenting .cm-md-codeblock,
|
|
3723
|
+
body.slides-printing .cm-md-codeblock {
|
|
3724
|
+
font-size: 0.82em;
|
|
3725
|
+
line-height: 1.55;
|
|
3726
|
+
padding: 0 1.1em;
|
|
3727
|
+
border-radius: var(--pele-radius, 8px);
|
|
3728
|
+
white-space: pre-wrap;
|
|
3729
|
+
overflow-wrap: anywhere;
|
|
3730
|
+
}
|
|
3731
|
+
|
|
3732
|
+
/* 引用(非 quote 版式):一根强调色细线,字号略降,与被引正文拉开层次。 */
|
|
3733
|
+
body.presenting .cm-md-blockquote,
|
|
3734
|
+
body.slides-printing .cm-md-blockquote {
|
|
3735
|
+
border-left: 2px solid var(--pele-accent);
|
|
3736
|
+
padding-left: 1em;
|
|
3737
|
+
font-size: 1.02em;
|
|
3738
|
+
color: var(--text-secondary);
|
|
3739
|
+
}
|
|
3740
|
+
|
|
3741
|
+
/* 表格:表头一根强调色粗线定标,行线压到最细,内距放宽——PPT 的表格
|
|
3742
|
+
* 读的是列,不是网格。 */
|
|
3743
|
+
body.presenting .cm-md-table-widget table,
|
|
3744
|
+
body.slides-printing .cm-md-table-widget table {
|
|
3745
|
+
font-size: 0.88em;
|
|
3746
|
+
border-collapse: collapse;
|
|
3747
|
+
}
|
|
3748
|
+
|
|
3749
|
+
body.presenting .cm-md-table-widget th,
|
|
3750
|
+
body.slides-printing .cm-md-table-widget th {
|
|
3751
|
+
font-family: var(--slide-title-font, var(--slide-serif, Georgia, serif));
|
|
3752
|
+
padding: 0.5em 0.7em;
|
|
3753
|
+
border-bottom: 2px solid var(--pele-accent);
|
|
3754
|
+
}
|
|
3755
|
+
|
|
3756
|
+
body.presenting .cm-md-table-widget td,
|
|
3757
|
+
body.slides-printing .cm-md-table-widget td {
|
|
3758
|
+
padding: 0.45em 0.7em;
|
|
3759
|
+
border-bottom: 1px solid var(--border-color);
|
|
3760
|
+
}
|
|
3761
|
+
|
|
3762
|
+
/* 图片:一张图不该撑破一页。放映按视口高度收,导出按纸面高度收——纸面 1080 高,
|
|
3763
|
+
* 导出会把令牌定成纸面的那一档(见 slides-export.ts)。 */
|
|
3764
|
+
body.presenting #editor img,
|
|
3765
|
+
body.slides-printing #editor img {
|
|
3766
|
+
max-height: var(--slide-img-max-h);
|
|
3767
|
+
max-width: 100%;
|
|
3768
|
+
object-fit: contain;
|
|
3769
|
+
border-radius: var(--pele-radius, 8px);
|
|
3770
|
+
}
|
|
3771
|
+
|
|
3772
|
+
/* mermaid 等 SVG 图:放映时受 base.css 的 72vh 上限,导出没有窗口视口,用纸面
|
|
3773
|
+
* 1080 的 72vh 定死同一个比例,否则大图会撑破一页、再被整页 zoom 压小。
|
|
3774
|
+
* 不带 #editor:figure 版式那条(0,4,2)要压得过这一条(0,3,2)。 */
|
|
3775
|
+
body.slides-printing .cm-content svg {
|
|
3776
|
+
max-height: var(--slide-img-max-h);
|
|
3777
|
+
}
|
|
3778
|
+
|
|
3779
|
+
/* 分页符残留:分隔线是分页边界,不是正文的一行,放映时不画。不带 #editor
|
|
3780
|
+
* 是刻意的——页内 slide-css 想把某条线当进度条用时,要压得过这一条。
|
|
3781
|
+
* 打印侧另有一条带 !important 的隐藏规则(slides-export.ts)。 */
|
|
3782
|
+
body.presenting .cm-md-hr {
|
|
3783
|
+
display: none;
|
|
3784
|
+
}
|
|
3785
|
+
|
|
3786
|
+
/* ─── 导出防跨页(不改放映的排版)────────────────────────────────────
|
|
3787
|
+
* kpi/matrix 卡片、timeline 节点、steps 步骤行、two-col 单元在导出下都是
|
|
3788
|
+
* 流式排在纸上的,条目可能被拦腰切到两页上。这里只加 break-inside: avoid
|
|
3789
|
+
* ——宁可整条挪到下一页,不在半截切断。
|
|
3790
|
+
*
|
|
3791
|
+
* 排版本身(字号、行高、内距)与放映共用同一份规则:纸面 1920×1080 就是
|
|
3792
|
+
* 放映的设计空间,之前那套「导出再收一档」的密度校准(基准 24px、
|
|
3793
|
+
* 行高 1.62、代码块 0.72em、表格 0.75em)连同它的理由一起删掉了——
|
|
3794
|
+
* 它是为了把写死的 24px 塞进纸面,导出字号回到与放映一致后就不再需要
|
|
3795
|
+
* (2026-11-23)。真装不下的页由 slides-export.ts 整页等比压回一页。 */
|
|
3796
|
+
body.slides-printing .cm-md-slide-kpi.cm-md-li,
|
|
3797
|
+
body.slides-printing .cm-md-slide-matrix.cm-md-li,
|
|
3798
|
+
body.slides-printing .cm-md-slide-timeline.cm-md-li,
|
|
3799
|
+
body.slides-printing .cm-md-slide-steps.cm-md-li,
|
|
3800
|
+
body.slides-printing .cm-md-slide-two-col:not(.cm-md-page-start) {
|
|
3801
|
+
break-inside: avoid;
|
|
3802
|
+
}
|