mermaid-js / mermaid-cli

Command line tool for the Mermaid library
MIT License
2.23k stars 210 forks source link

Apply styles from inside mermaid graphs #631

Open micartey opened 6 months ago

micartey commented 6 months ago

You can set styles inside a mermaid graph with something like:

subgraph container [Container]
    ....
    style container fill: transparent, stroke-width: 0px, padding: 0px, margin: 0px
end

But the style is not applied when building the graph to a png e.g. I saw that there is a -cssFile flag...

Now I see two possibilities:

  1. Create CSS files - If so, then how can I set the style for the container subgraph?
  2. The CLI should detect the styles and apply them on the go