Change Mermaid CSS

To style in the mermaid block the current way that works is to define the classes within the block itself.

For example:

graph LR;
    A-->B[AAA];
    B-->D;

    %% Class Definitions
    %% =================
    class A cssClass;
    classDef cssClass fill:#f9f,stroke:#333,stroke-width:4px, font-size:15px;

It appears that adding the css do the custom.css file isn’t working for the moment.

For more details see the mermaid docs: https://github.com/mermaidjs/mermaid-gitbook/blob/master/content/flowchart.md#styling-a-node

2 Likes