hungsu / typomagical-obsidian

An Obsidian theme for typographic appreciators, with support for Style Settings by mgmeyers
https://forum.obsidian.md/t/typomagical-a-theme-for-typographic-appreciators/26860
GNU General Public License v3.0
114 stars 5 forks source link

Mermaid diagrams placement and background colors #25

Open olrenso opened 2 years ago

olrenso commented 2 years ago

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.