E411 In a Sequence Diagram the primaryColor config is ignored for participants' background color · Issue #5034 · squidfunk/mkdocs-material · GitHub
[go: up one dir, main page]

Skip to content

In a Sequence Diagram the primaryColor config is ignored for participants' background color  #5034

@ebouchut

Description

@ebouchut

Context

I configured a primaryColor in a sequence diagram on a page of a site using mkdocs-material version 9.0.12.
I expect the background color of the participant box to be the same as primaryColor, whereas it is not.

%%{
  init: {
    'theme': 'base',
      'themeVariables': {
        'primaryColor': 'lightgreen'
    }
  }
}%%
sequenceDiagram
    actor       user as User
    participant p    as Button

    user   ->>  p: click

Bug description

The diagram is not rendered as expected:

  • ✅ The background color of the actor box (User) is the same as primaryColor which is expected.
  • ❌ The background color of the participant box (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 expected mkdocs-material to do.

My understanding of mermaid.js documentation is the following:

  • actorBkg mentions that primaryColor is the default background color for an actor.
  • MainBkg computed from primaryColor "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.

%%{
  init: {
    'theme': 'base',
      'themeVariables': {
        'primaryColor': 'lightgreen'
    }
  }
}%%
sequenceDiagram
    actor       user as User
    participant p    as Button

    user   ->>  p: click
Loading

Related links

Reproduction

example.zip

Steps to reproduce

  1. Open http://127.0.0.1:8000/diagram/
  2. In the sequence diagram, the background color of both the actor (User) and the participant (Button) boxes should be green.

Browser

No response

Before submitting

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue reports a bugresolvedIssue is resolved, yet unreleased if open

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0