Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to style a Mermaid subgraph's title?

Tags:

mermaid

How to style the title in a Mermaid subgraph? I would like to make the font larger and add some blank space between the title and the first node beneath it.

I tried adding some <br/>'s after the title but that pushed the title above the boundary of the subgraph.

graph TB

subgraph someID[Some Title]
    direction TB
    ....
end 
like image 320
Tony_Henrich Avatar asked Sep 09 '25 18:09

Tony_Henrich


1 Answers

Styling a subgraph title seem to work like this:

graph TB
subgraph ED[Every Day]
   A <--> B
end

style ED color:#f66

Caveat: I'm using Microsoft Github's in-browser Mermaid markdown preview and I'm not sure to what degree their implementation is conformant.

like image 86
lmat - Reinstate Monica Avatar answered Sep 14 '25 22:09

lmat - Reinstate Monica