Skip to content

How to modify Mermaid CSS #4582

Answered by squidfunk
Vasperous asked this question in Q&A
Oct 31, 2022 · 3 comments · 5 replies
Discussion options

You must be logged in to vote

Thanks for asking. Unfortunately, you cannot override Mermaid's CSS with additional CSS, because Mermaid.js diagrams must be encapsulated in shadow DOMs due to duplicate identifiers which lead to undefined behavior. If you wish to add or change some of the CSS Material for MkDocs applies to Mermaid.js, you would need to make your changes here and rebuild the theme.

I recommend reading #2170 and mermaid-js/mermaid#1318 to understand the current design limitations.

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by squidfunk
Comment options

You must be logged in to vote
2 replies
@squidfunk
Comment options

@RokeJulianLockhart
Comment options

Comment options

You must be logged in to vote
3 replies
@Vasperous
Comment options

@Vasperous
Comment options

@C3pa
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants