Skip to content

Mermaid: allow customizing sequence diagram notes node style #5824

@sisp

Description

@sisp

Context

The color of Mermaid sequence diagram notes looks a bit off IMO (see, e.g., https://squidfunk.github.io/mkdocs-material/reference/diagrams/#using-sequence-diagrams), at least not as nicely integrated with the rest of the theme colors.

Description

mkdocs-material overrides some Mermaid colors with own CSS variables but not the "note" node. How about introducing new CSS variables, e.g. --md-mermaid-note-bg-color as the fill color and --md-mermaid-note-fg-color as the stroke color (consistent with existing naming), and add an override for Mermaid's note CSS class? The default colors could be based on the info admonition color.

There exists some customization for note text, so perhaps not customizing the note rect itself was an oversight.

Related links

Use Cases

Having a nicely integrated Mermaid diagram makes documentation more pleasant to read. It's mostly good already, but sequence diagram notes look a bit off.

Visuals

No response

Before submitting

Metadata

Metadata

Assignees

No one assigned

    Labels

    change requestIssue requests a new feature or improvementresolvedIssue is resolved, yet unreleased if open

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions