Skip to content

fix: Mermaid 图表容器贴合内容并去除外框 - #76

Merged
shaohaozhi286 merged 1 commit into
masterfrom
codex/fix-mermaid-intrinsic-size
Sep 27, 2026
Merged

shaohaozhi286 merged 1 commit into
masterfrom
codex/fix-mermaid-intrinsic-size

Conversation

@shaohaozhi286

Copy link
Copy Markdown
Collaborator

对话中的 Mermaid 图表此前使用铺满整行的容器,周围带边框、底色和留白。现在容器宽度随图表内容收紧,去掉外框与内边距,让透明图表直接融入对话背景。保持原始宽高、超宽滚动、复制和放大预览;键盘焦点轮廓改为内侧显示,避免被紧贴图表的容器裁切。

验证:

  • pnpm test、pnpm build、git diff --check 通过。
  • 完整生产前端浏览器验证:1600px / 390px 视口,125% / 150% DPR,浅色 / 深色主题;318px、850px 图表在空间足够时容器宽度与图表一致,无边框、透明背景、零内边距,原始图像尺寸不变,超宽滚动与点击预览正常。

@shaohaozhi286
shaohaozhi286 merged commit 1978885 into master Sep 27, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants