Description
When using GitGraph with the LR (left‑to‑right) layout, branch labels that contain multi‑line text are not vertically aligned with their background rectangle. The background box appears higher than the text, causing a visual offset.
Steps to reproduce
-
Create a GitGraph instance with layout: "LR".
-
Add a branch and set its label to a string that includes line breaks (e.g., "Feature A\n(ongoing)").
-
Render the graph.
-
Observe the branch label: the background rectangle is positioned higher than the text block.
Screenshots
No response
Code Sample
gitGraph LR:
commit
branch "Feature A\n(ongoing)"
commit
commit
checkout main
commit
commit
Setup
- Mermaid version: 11.12.0
- Browser and Version: [Chrome, Edge, Firefox]
Suggested Solutions
No response
Additional Context
No response
Description
When using GitGraph with the LR (left‑to‑right) layout, branch labels that contain multi‑line text are not vertically aligned with their background rectangle. The background box appears higher than the text, causing a visual offset.
Steps to reproduce
Create a GitGraph instance with layout: "LR".
Add a branch and set its label to a string that includes line breaks (e.g., "Feature A\n(ongoing)").
Render the graph.
Observe the branch label: the background rectangle is positioned higher than the text block.
Screenshots
No response
Code Sample
Setup
Suggested Solutions
No response
Additional Context
No response