Automatically set mermaid themes to match dark / light

Open
#1,530 2 comments 5 reactions 2 assignees View on GitHub

@gordonwoodhull is already working on this.

Since Mar 29, 2025.

Assessment

This issue has not been assessed yet.

Description

dark-mode diagrams enhancement themes
Discussed in https://github.com/quarto-dev/quarto-cli/discussions/1521

Originally posted by edavidaja July 25, 2022
currently I'm using a reveal presentation with theme: night and adding

%%{init: {"theme": "dark" } }%%

to each diagram. I'm not sure if this works for every diagram type--the mermaid website suggests that theming, for example, state machines has to be done via a different mechanism.

Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from quarto-dev/quarto-cli

All issues in quarto-dev/quarto-cli

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.