Skip to content
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

Added support for dark mode #463

Merged
merged 2 commits into from Nov 5, 2021
Merged

Conversation

RunDevelopment
Copy link
Contributor

This fixes #456.

The HTML this plugin generates is a little more complex now. We generate 3 variants of each graph now:

  1. One dark theme variant.
  2. One light theme variant.
  3. One code block variant.

The code block is a fallback in case the mermaid library failed to load or JavaScript is disabled by the user.

CSS is used to only ever show one of the 3 variants.

Some implementation details

Screenshots

Dark mode:

image

Light mode:

image

No JS:

image

@kamiazya kamiazya added the enhancement New feature or request label Nov 5, 2021
@kamiazya
Copy link
Owner

kamiazya commented Nov 5, 2021

@RunDevelopment
Sorry for the late review time.

LGTM, merged.

@kamiazya kamiazya merged commit 0544406 into kamiazya:main Nov 5, 2021
@RunDevelopment RunDevelopment deleted the issue456 branch November 5, 2021 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for dark theme
2 participants