-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mermaid: allow customizing sequence diagram notes node style #5824
Comments
Thanks for suggesting. Yes, we can certainly make Mermaid diagrams more configurable in the future 😊 |
@squidfunk awesome! Would you accept a little PR for this? I think even the default schemes could benefit from this, see the current demo in slate: |
Yes, but we should actually add an additional layer of abstraction for each component in each diagram type, so that you can comfortable overwrite it with CSS. If you would like to work on this, a PR would be amazing. We could start with the sequence diagram and after then translate the solution over to the other types 😊 |
Thanks @squidfunk! Just to clarify, do you mean simply in the color variables, e.g |
Yes. I'd say it might make sense to introduce a little hierarchy to comfortably style Mermaid.js components, and specific components inside diagrams. I haven't made up my mind how a hierarchy of CSS variables could look like, but I'd be happy if somebody was up to do the legwork and submit a PR for it. We need a first draft which we can discuss |
@squidfunk Not yet, but it's on my list for next week. Thanks for asking and checking! 👍 |
I've submitted a PR: #5940 |
Released as part of 9.2.7. |
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'snote
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
The text was updated successfully, but these errors were encountered: