fix: update MermaidBlock styles for improved rendering and add foreignObject (#7960)

fix: update MermaidBlock styles for improved rendering and add foreignObject width

Co-authored-by: lixiaoyang1992 <lixiaoyang2345@gmail.com>
This commit is contained in:
Dallin Romney
2025-09-25 15:58:05 -07:00
committed by GitHub
parent 00a24af571
commit 4dfe1ffc9a
2 changed files with 4 additions and 1 deletions

View File

@@ -141,7 +141,7 @@ export default function MermaidDiagram({ code }: { code: string }) {
{!!error ? (
<div className="text-error whitespace-pre text-sm">{error}</div>
) : (
<div className="relative">
<div className="mermaid relative">
<div className="absolute right-0 z-10 m-2 flex items-center gap-x-1">
<ToolTip content={"Zoom In"}>
<MagnifyingGlassPlusIcon

View File

@@ -1038,3 +1038,6 @@ body[data-color-mode*="light"] {
.token.entity {
cursor: help;
}
.mermaid foreignObject {
width: 100%;
}