Skip to content
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

Edge labels in flow chart use primaryTextColor rather than secondaryTextColor #5052

Open
mrmanc opened this issue Nov 20, 2023 · 2 comments
Open
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@mrmanc
Copy link
Contributor

mrmanc commented Nov 20, 2023

Description

When I customise the theme using the documented variables to change the secondary color to the same as the primary text color, and modify the secondary text color to contrast with the secondary color, I can not see the label text as it appears to be incorrectly using the primary text color rather than the secondary text color.

Steps to reproduce

Create a diagram using the following code:

%%{
  init: {
    'theme': 'base',
    'themeVariables': {
      'primaryColor': '#000',
      'primaryTextColor': '#fff',
      'secondaryColor': '#fff',
      'secondaryTextColor': '#000'
    }
  }
}%%
flowchart TD
    A[Christmas] -->|Get money| B(Go shopping)
    B --> C{Let me think}
    C -->|One| D[Laptop]
    C -->|Two| E[iPhone]
    C -->|Three| F[fa:fa-car Car]
Loading

Screenshots

image

Code Sample

https://mermaid.live/edit#pako:eNp1kU1rwkAQhv_KsCWkhQiecyjUaL1YWqj00MTDmEzcxewHuytWTP57NwlWPfSyH_M-7wwzc2alroilLIrOhQIQSvgUhidA7DlJilOIt-goTm6jX2gFbhty8R8eJGOFRHvKdKNt73uYTqcX31Ve04-_InVd3yCOSq2quxz_APdZ-kIj0_VXOLooKlTd6GPJ0XpYz0f5Jc-4Fc5LdBuYTJ7bJXmQWtGphdnjUoPj2hihdk8jP-shyM6rHiPwXKh9N0rZ4H9X1MI8X6Hx2mxulfVRt7DIxQcP6e8Vbim4XvMa0xonJVrI0G5YwiRZiaIKGxmmWrBh2gVLwzN0vS9Y6CxwB1Ohp0UlvLYs9fZACcOD158nVV7-IzMXuLMoWSjUuBClwfM2rn3YfsIMqm-tL0z3C_BRp9E

Setup

  • Mermaid version: v10.6.1
  • Browser and Version: Google Chrome | 119.0.6045.159 (Official Build) (arm64)

Suggested Solutions

Change the style to use secondary text color for those nodes instead

Additional Context

No response

@mrmanc mrmanc added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Nov 20, 2023
@omer-priel
Copy link
Contributor

I working on this :)

@mrmanc
Copy link
Contributor Author

mrmanc commented Nov 22, 2023

Awesome, thanks for the speedy work @omer-priel! 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants