mermaid icon indicating copy to clipboard operation
mermaid copied to clipboard

The whole node should adjust to the font size of its containing text

Open zhouhana opened this issue 4 years ago • 2 comments

I'm reporting this as a feature request but kind of also think it's a bug.

I would like the whole node to adjust to the font size of its containing text.

Illustrating my problem below.

graph LR

  hellonode[hello] --> world
  classDef helloclass font-size:20px
  class hellonode helloclass

Screenshot 2020-11-25 at 14 46 19

zhouhana avatar Nov 25 '20 13:11 zhouhana

Also having this kind of problem

graph TD

    Start1(["start"])
    End1(["end"])
    FkExist["If it does not already exist, add the first mapping for <br> the property that will hold the value used by component A"]
    AddMap["Add mapping for the placeholder that <br>defines the lookup source and target"]
    
    subgraph "1 - Define mappings"

        Start1-->FkExist
        FkExist-->AddMap
        AddMap-->End1
    end

	classDef default stroke:#AAA,stroke-width:1px,font-size:20px,padding:5px;

produces image

Changing it from graph TD to LR or to flowchart doesnt fix it either.

StingyJack avatar Nov 12 '21 21:11 StingyJack

I'm running into this too (with version 9.2.2). In my case the problem only shows up in dev mode, and if I reload the page over and over, it eventually renders correctly. With SSR it seems to always get it right.

alpinegizmo avatar Nov 29 '22 13:11 alpinegizmo