-
-
Notifications
You must be signed in to change notification settings - Fork 358
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
Invalid mermaid colors when switching to dark/light mode, need to refresh page #999
Comments
as far as I know, this isn't REALLY something that congo/hugo controls... The colors in the generated diagram are selected by mermaid at generation time.... it's possible that a solution would be to generate the diagram twice at site rendering time, with both polarities, and use the resulting image as css... but that feels.... like the wrong way forward? color polarity is controlled entirely clientside.... so solutions have to be clientside based.. |
Maybe not? 👀 This exact approach is implemented for the Site Logo partial. congo/layouts/partials/logo.html Lines 7 to 22 in 89ae980
|
Maybe this can help? |
This is indeed an upstream issue and I'm not sure that forcing a page reload whenever the user changes dark mode is an ideal workaround. It seems to be a highly requested feature in Mermaid but is still yet to be implemented. |
Issue description
👋
Easy to see on https://jpanther.github.io/congo/samples/diagrams-flowcharts/
Switching from light to dark:
After page refresh:
Theme version
v2.10
Hugo version
v0.141
Which browser rendering engines are you seeing the problem on?
Chromium (Google Chrome, Microsoft Edge, Brave, Vivaldi, Opera, etc.)
URL to sample repository or website
No response
Hugo output or build error messages
The text was updated successfully, but these errors were encountered: