Using themes and styles in mermaid diagram #120
Closed
AbdulSayyed
started this conversation in
General
Replies: 1 comment 2 replies
-
|
Remove the following code should work, seems configuration, but not recognisable for some reason. I don't see difference without those code. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Mermaid module works as intended, but does not render if themes and styles are used. Could you tell me what needs to be used in a mermaid diagram?
For example, the following mermaid diagram is rendered on the Mermaid server but not when using the Mermaid module in the HbStack framework:
%%{ init: { "theme": "base", "themeVariables": {
"primaryColor": "#fdf6e3",
"edgeLabelBackground": "#ffffff",
"nodeBorder": "#586e75",
"nodeTextColor": "#073642",
"mainBkg": "#eee8d5"
}} }%%
graph TD
HTML["html"]:::root --> HEAD["head"]:::head
HTML --> BODY["body"]:::body
HEAD --> TITLE["title"]:::head
HEAD --> META["meta"]:::head
BODY --> HEADER["header"]:::section
BODY --> MAIN["main"]:::section
BODY --> FOOTER["footer"]:::section
HEADER --> H1["h1"]:::text
MAIN --> SECTION["section"]:::section
SECTION --> ARTICLE["article"]:::section
ARTICLE --> H2["h2"]:::text
ARTICLE --> P["p"]:::text
FOOTER --> P2["p"]:::text
classDef root fill:#b58900,stroke:#586e75,color:#fff;
classDef head fill:#268bd2,stroke:#586e75,color:#fff;
classDef body fill:#2aa198,stroke:#586e75,color:#fff;
classDef section fill:#6c71c4,stroke:#586e75,color:#fff;
classDef text fill:#dc322f,stroke:#586e75,color:#fff;
Beta Was this translation helpful? Give feedback.
All reactions