-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
In a Sequence Diagram the primaryColor config is ignored for participants' background color #5034
Comments
Thanks for reporting. Material for MkDocs Mermaid integration is a bit different – it automatically sets the colors to the accent color you choose when configuring the theme. We use CSS variables to override specific parts of Mermaid graphs. This has several upsides, as mentioned in our documentation:
Fixed in 5065bf9. The sequence actors, which were rendered green in your example, are now also rendered using the defined accent color. This is consistent with the rendering of the rest of our Mermaid integration: Additionally, this commit introduces a way to override accent colors on a per-diagram basis. When <div data-md-color-accent="green" markdown>
``` mermaid
sequenceDiagram
actor user as User
participant p as Button
user ->> p: click
```
</div> If you wish to override colors for all Mermaid diagrams, use additional CSS and override the variables defined here:
|
Released as part of 9.0.13. |
👍 Thank you! |
Context
I configured a
primaryColor
in a sequence diagram on a page of a site usingmkdocs-material
version 9.0.12.I expect the background color of the participant box to be the same as
primaryColor
, whereas it is not.Bug description
The diagram is not rendered as expected:
User
) is the same asprimaryColor
which is expected.Button
) is white, which is not expected, I 🤔 .Both Mermaid Live Editor and Github Previewer, use the
primaryColor
for the participant's background color. This is what I expectedmkdocs-material
to do.My understanding of mermaid.js documentation is the following:
actorBkg
mentions thatprimaryColor
is the default background color for an actor.MainBkg
computed fromprimaryColor
"should be" used in this case.🤔 This is my understanding of this gray part of the documentation.
Let me know what you think about this.
Related links
Reproduction
example.zip
Steps to reproduce
User
) and the participant (Button
) boxes should be green.Browser
No response
Before submitting
The text was updated successfully, but these errors were encountered: