emersonbottero / vitepress-plugin-mermaid

Add mermaid support for Vitepress
MIT License
95 stars 22 forks source link

Please add a way to set a class for parent div container #37

Closed dominikcz closed 1 year ago

dominikcz commented 1 year ago

It would be nice to have the ability to add a class to parent div container. In Vuepress there was a class "mermaid" added by default, but there is no selector now to aid with styling.

dominikcz commented 1 year ago

Just additional note: if you don't want to add extra functionality like that, then maybe just add some default class like mermaid or something similar? It's really hard to reliably style diagrams without restricting selectors to parent container. I want to change things that are not available through theme configuration.

emersonbottero commented 1 year ago
<div class="my-class">
```mermaid
flowchart TD
  Start --> Stop

dominikcz commented 1 year ago

Yes, I'm aware of that option, but it's troublesome having to repeat that for every graph, not to mention mixing html with markdown... Please see #40 for my idea of accomplishing this task

dominikcz commented 1 year ago

hi, any plans on merging it to main?

emersonbottero commented 1 year ago

I'll add a static mermaid class to it. trying to remove the mindmap dependcy also.