-
Notifications
You must be signed in to change notification settings - Fork 335
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 subgraph background too dark #9178
Comments
Reveal.js does not use Bootstrap contrary to other Quarto HTML based formats and since Mermaid.js does make a lot of releases with many changes, it's no surprise that Quarto is bit behind in terms of theming compatibility. |
Some current workaround in the meantime share at |
I'm closing #5416 in favour of creating separate, more specific issues. This issue seems like a good place to start! I just updated the Mermaid demos in quarto to Quarto 1.5.54 using the Mermaid demos for Mermaid 10.2.4, and I can confirm that the described issue still persists in Quarto 1.5.54. If it's ever necessary, I can update this demo page to verify whether the problem has been solved! Mermaid docs on subgraphs: https://mermaid.js.org/syntax/flowchart.html#subgraphs Output of the same example in Quarto 1.5.54: https://mermaid-demos-in-quarto.netlify.app/syntax/flowchart#subgraphs |
It should be noted that the subgraph colours simply seem to be swapped between dark and light mode, because when I view the same diagram in dark mode, it is suddenly very bright. Mermaid docs in dark mode: Quarto render in dark mode: |
Bug description
As described in Issue #5416, the background of a mermaid subgraph is too dark when creating a revealjs presentation. It may extend to other formats, but that is my use case.
I think I found a temporary fix and a possible solution. As mentioned here, the variable mermaid-fg-color--lightest in your CSS/SCSS controls the subgraph background. For example, to set it to white:
In case it helps anyone debug this, this line sets the subgraph background color to mermaid-fg-color--lightest, since subgraphs are cluster elements. This defaults to $mermaid-fg-color--lightest: lighten($body-color, 20%); according to the docs. Should it default to a background color instead of a foreground color?
Steps to reproduce
The code from this post reproduces it for me:
Then run
quarto preview test.qmd
.Expected behavior
I expect it to be light:
Again, taken from this post.
Actual behavior
It is very dark. When I run
quarto preview test.qmd
, I getYour environment
preview
from the command line)Quarto check output
The text was updated successfully, but these errors were encountered: