diff --git a/.changeset/tangy-ghosts-watch.md b/.changeset/tangy-ghosts-watch.md new file mode 100644 index 000000000..9d69de4d0 --- /dev/null +++ b/.changeset/tangy-ghosts-watch.md @@ -0,0 +1,5 @@ +--- +'mermaid': patch +--- + +fix: adjust sequence diagram title positioning to prevent overlap with top border in Safari diff --git a/packages/mermaid/src/diagrams/sequence/svgDraw.js b/packages/mermaid/src/diagrams/sequence/svgDraw.js index c681c9491..04ccd8a84 100644 --- a/packages/mermaid/src/diagrams/sequence/svgDraw.js +++ b/packages/mermaid/src/diagrams/sequence/svgDraw.js @@ -524,7 +524,7 @@ export const drawBox = function (elem, box, conf) { box.name, g, box.x, - box.y + (box.textMaxHeight || 0) / 2, + box.y + conf.boxTextMargin + (box.textMaxHeight || 0) / 2, box.width, 0, { class: 'text' },