Context
No response
Bug description
Labels in nodes and arrows are overflowing the size of their nodes.

It happens since version 9.0.13. More specifically, it has probably been introduced by this commit: 5065bf9
Here is how it looked like in 9.0.12 and before:

Suspected root cause
The variable --md-mermaid-font-family is now only defined under the .mermaid class and not in :root anymore. For some reasons, Mermaid compiler may not be able to pick it and thus compute the size of the nodes with its default font instead.
Workaround
If I manually set the variable in :root in custom CSS, it solves the issue:
:root > * {
--md-mermaid-font-family: var(--md-text-font-family), sans-serif;
}
Related links
Reproduction
example.zip
Steps to reproduce
- Enable Mermaid superfence extension.
- Add a Mermaid diagram with long labels on nodes and arrows.
Browser
Chrome, Safari, Firefox
Before submitting
Context
No response
Bug description
Labels in nodes and arrows are overflowing the size of their nodes.
It happens since version 9.0.13. More specifically, it has probably been introduced by this commit: 5065bf9
Here is how it looked like in 9.0.12 and before:
Suspected root cause
The variable
--md-mermaid-font-familyis now only defined under the.mermaidclass and not in:rootanymore. For some reasons, Mermaid compiler may not be able to pick it and thus compute the size of the nodes with its default font instead.Workaround
If I manually set the variable in
:rootin custom CSS, it solves the issue:Related links
Reproduction
example.zip
Steps to reproduce
Browser
Chrome, Safari, Firefox
Before submitting