I am experiencing an unexpected behavior of mermaid’s Gantt chart functionality.
Using the example on mermaid’s GitHub page (under section “Gantt - [docs - live editor]”) using the following code in Obsidian:
gantt
section Section
Completed :done, des1, 2014-01-06,2014-01-08
Active :active, des2, 2014-01-07, 3d
Parallel 1 : des3, after des1, 1d
Parallel 2 : des4, after des1, 1d
Parallel 3 : des5, after des3, 1d
Parallel 4 : des6, after des4, 1d
the output of the line with the parameter “active” does show a completely black box for this entry in the Gantt chart. Output should be, again according to mermaid’s GitHub page, a box with light blue background.
Hi, I just wanted to provide a quick note here for people who stumble onto this post about potential options for fixing the mermaid css.
As of when I wrote this reply, the default dark theme in Obsidian (v0.10.1) still has some inconsistent behavior when rendering mermaid diagrams. Graphs and Sequence Diagrams worked ok for me, but class diagrams were unreadable.
Add that as a custom css snippet and enable in options to at least get the class diagrams readable, and tweak to get the colors the how you like them. See https://mermaid-js.github.io/mermaid/#/classDiagram?id=default-styles for more info on which CSS classes do what. Thanks.
I ran into this as well. It would be wonderful if Obsidian diagrams would look nice with every theme.
I have this snippet in my CSS snippet folder. It uses the theme CSS variables, so it should work with most themes. I’m not going for gorgeous, just readable.
Same here. Linux Mint 20.1/Cinnamon, Obsidian/AppImage 0.11.13, Installer 0.10.11, no theme selected:
journey
title My working day
section Go to work
Make tea: 5: Me
Go upstairs: 3: Me
Do work: 1: Me, Cat
section Go home
Go downstairs: 5: Me
Sit down: 5: Me