Mermaid Diagram Examples
Shared styling
The documentation site now keeps the Mermaid theme in scripts/mermaid-theme.css
so it can be reused from other projects (like the public website). That stylesheet carries our custom colours and the "magic" selectors that hide layout helpers. When you need a hidden spacer node or edge, name it with an empty
or free
prefix (for example empty1
or free-route
). The generated Mermaid id/class will include that word, which matches selectors like [id^='flowchart-empty']
, LS-empty
, and LE-free
; the node stays invisible while still influencing the layout. Edges connected to those helpers get ids such as L_empty1_*
, and the theme hides them too so arrows into spacer nodes never show up.
Placeholder examples from other docs
Cluster identity activation
Copied from docs/ProtoActor/cluster.md
, this diagram uses placeholder nodes (empty1
, empty2
, empty3
, empty4
) to keep the three member columns aligned while the grain is still pending activation.
Cluster identity after activation
Also from docs/ProtoActor/cluster.md
, this version shows the PID and grain once activation has happened. Hidden placeholders keep the column layout even though the grain only lives on one member.
Gossip fan-out spacing helpers
Taken from docs/ProtoActor/cluster/gossip.md
, placeholder nodes (empty
, empty2
) help route arrows cleanly between members without visible artefacts.