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

Setting some theme variables by directives spills over into subsequent diagrams #1874

Closed
knsv opened this issue Jan 27, 2021 · 0 comments · Fixed by #1875
Closed

Setting some theme variables by directives spills over into subsequent diagrams #1874

knsv opened this issue Jan 27, 2021 · 0 comments · Fixed by #1875
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@knsv
Copy link
Collaborator

knsv commented Jan 27, 2021

This might look similar as #1871 but I suspect this has a very different root cause.

Another thing of note is that if no changes to the theme variables are done in the initialize call, the overflow does not happen. This is likly a good clue to finding the bug.

image

<html>
  <head>
    <script src="http://localhost:9000/mermaid.js"></script>
  <script>
      mermaid.initialize({
       theme: 'base',
       themeVariables: {
      },
      startOnLoad: true,
      });
  </script>

  </head>
  <body>
  <h1>Example</h1>
  <div class="mermaid">
%%{init:{"theme":"base", "sequence": {"mirrorActors":false},"themeVariables": {"actorBkg":"red"}}}%%
sequenceDiagram
    Woman->>+Man: Start looking for the dog!
    Man-->>-Woman: Found it!
    Note left of Man: The number in the circles are white
  </div>
  <div class="mermaid">
%%{init:{"theme":"base", "sequence": {"mirrorActors":false}}}%%
sequenceDiagram
    Woman->>+Man: Start looking for the dog!
    Man-->>-Woman: Found it!
    Note left of Man: The number in the circles are white
  </div>
</body>
</html>
@knsv knsv added Type: Bug / Error Something isn't working or is incorrect Topic: Styling labels Jan 27, 2021
@github-actions github-actions bot added the Status: Triage Needs to be verified, categorized, etc label Jan 27, 2021
knsv added a commit that referenced this issue Jan 28, 2021
knsv added a commit that referenced this issue Jan 28, 2021
…is_tainted

#1874 Protecting the original configuration
@github-actions github-actions bot locked and limited conversation to collaborators Jan 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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.

1 participant