badboy / mdbook-mermaid

A preprocessor for mdbook to add mermaid support
Mozilla Public License 2.0
306 stars 32 forks source link

Implement dark mode support for mermaid. #38

Closed AnthonyTornetta closed 8 months ago

AnthonyTornetta commented 1 year ago

Supporting dark theme on mermaid is a relatively easy fix that should be supported out of the box. All the changes required would be in mermaid-init.js, and could be changed by the end user if required.

It would be as simple as reading the class appended to the HTML field and choosing mermaid's theme accordingly before initializing it.

xyzst commented 8 months ago

@badboy : do you see any issues here? Seems like @AnthonyTornetta has addressed concerns expressed here: https://github.com/badboy/mdbook-mermaid/issues/35#issuecomment-1614564202

badboy commented 8 months ago

I don't know. I won't have time to look into this, maybe after the holidays.