Skip to content
Discussion options

You must be logged in to vote

Thank you for the tip. I should have inspected it before writing, of course. The difference seems to be that github is using a different HTML construction to render the flowchart-label:

  • github: <foreignObject><div><span>...</span> </div></foreignObject>
  • Quarto: <text><tspan>...</tspan></text>

The Mermaid CSS is very similar, but since <text> has its own styling, it overrides the style assigned at the container group <g> (the custom dark class).

In order to make Quarto use the same HTML construct one should add

%%{init:{"theme":"base", "flowchart": {"htmlLabels": true}}}%%

This options is not currently exposed in YAML, but I feel like it should be:

---
title: "Untitled"
format: 
   html:…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@dmi3kno
Comment options

Answer selected by dmi3kno
Comment options

You must be logged in to vote
2 replies
@cscheid
Comment options

@cderv
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
diagrams-mermaid Mermaid diagrams
3 participants