xfy
fac247f60a
feat(mermaid): 流程图配色对齐 Catppuccin + 容器美化
mermaid.initialize 之前用内置 'default'/'dark' 主题,配色与站点 Catppuccin
调色板完全脱节,图是"外来"的样子;且零 mermaid 专用 CSS,SVG 直接套在通用
pre 容器里,宽图横向滚动、无居中无留白。
改动:
- mermaid.ts:theme 切到 'base'(base 不硬编码颜色,themeVariables 能完全
控制调色板;'default' 主题硬编码 mainBkg=#ECECFF 会阻断覆盖)。新增 Latte/
Mocha 两套 themeVariables,节点用 surface 色阶、边框/连线用 subtext 色阶、
文字用 primary text,hex 取自 themes/*.tmTheme。flowchart 配 basis 平滑曲线
+ diagramPadding 16 + useMaxWidth:true(配合 CSS 消除横向滚动)。
- input.css:新增 .md-content pre[data-mermaid-rendered] 规则,flex 居中 + svg
max-width:100% 缩放适配;.mermaid-error 加 accent 色左边条提示。
- mermaid.test.ts:theme 断言同步到 'base'+darkMode;新增 themeVariables
注入测试(钉住 Latte/Mocha 关键 hex)。
范围:纯前端 TS + CSS,零 Rust 改动。
2026-07-17 10:13:20 +08:00
..
2026-07-17 10:13:20 +08:00
2026-07-14 15:39:41 +08:00
2026-07-02 17:50:52 +08:00
2026-07-02 17:54:46 +08:00
2026-06-26 13:51:39 +08:00