During the first two weeks of January this year, I developed a few Mermaid Sanke Charts in Obsidian and all was fine. Then, around 1/12, I think, it stopped working (as described above) and the problem has persisted.
I haven’t found any solution for version 1.5.12.
Does anyone have any ideas or workaround?
SYSTEM INFO:
Obsidian version: v1.5.12
Installer version: v1.5.12
Operating system: Windows 10 Pro 10.0.22631
Login status: logged in
Catalyst license: insider
Insider build toggle: on
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on
RECOMMENDATIONS:
none
As Obisidian support CSS snippets, do you know any method with which one can remove a style which is generated automatically by Obsidian? In this case, if we can find a way to mute the styles causing the problem, prehapse, there could be a quick fix/workaround.
So, I revisited this topic and ended up on a slightly deeper dive. It seems like the way Obsidian initializes Mermaid is to force the styling to match the Obsidian theme, and sankey doesn’t get any overrides.
However, after a little bit of testing, you can change your sankey mermaid codeblocks to override it.
```mermaid
sankey-beta
%%{init: {'themeCSS':''}}%%
[... Diagram here ...]
```
Mileage may vary depending on your active Obsidian theme, but you should be getting colours and it should be readable.
On this workaround, I have another question:
this workaround is amazing, where can I find some instruction on how does%%{init: {'themeCSS':''}}%% work?