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

Mermaid diagrams placement and background colors #25

Open
olrenso opened this issue Dec 10, 2021 · 0 comments
Open

Mermaid diagrams placement and background colors #25

olrenso opened this issue Dec 10, 2021 · 0 comments

Comments

@olrenso
Copy link

olrenso commented Dec 10, 2021

These bugs are also present in the default theme. However, they seem to be quite fast-forward to fix.

Placement

When the graphs are wider than text width they are shifted to the right.

It's easy to fix with something like that:

.statediagram{
  max-width: 100%;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

Background colors on dark themes

On the dark variation of the themes, the boxes' background colors seem to be broken:

This issue's a little more tricky.
You can easily change the fill color with:

.statediagram-cluster.statediagram-cluster .inner{
  fill: var(--background-secondary) !important;
}
.statediagram-cluster.statediagram-cluster-alt .inner{
  fill: var(--background-secondary-alt) !important;
}

but as you can see you need to use !important. I didn't find a way to avoid it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant