copier-org / copier

Library and command-line utility for rendering projects templates.
https://readthedocs.org/projects/copier/
MIT License
2.06k stars 182 forks source link

bug: Diagram not displaying correctly in dark mode in latest documentation #541

Closed eyllanesc closed 2 years ago

eyllanesc commented 2 years ago

Describe the problem In the latest documentation (not in the stable one) it is observed that the arrows of the update diagram are not visible in the dark mode. See https://copier.readthedocs.io/en/latest/updating/#how-the-update-works.

Expected behavior

Arrows must be visible on all themes.

Screenshots/screencasts/logs

dark mode:

Screenshot_20220113_211119

light mode:

Screenshot_20220113_211106

pawamoy commented 2 years ago

This was indeed brought up by @Yajo in #528. I saved the notification to see if I can find a way to make the lines visible with both themes.

eyllanesc commented 2 years ago

@pawamoy I think some css should be added that changes the color of the chart based on the theme change.

pawamoy commented 2 years ago

Native support for Mermaid.js is still in Insiders: https://squidfunk.github.io/mkdocs-material/reference/diagrams/ But yeah there might be a way with CSS :slightly_smiling_face:

yajo commented 2 years ago

Native support for Mermaid.js is still in Insiders: https://squidfunk.github.io/mkdocs-material/reference/diagrams/ But yeah there might be a way with CSS 🙂

That page works fine in dark mode. How do they do it?

eyllanesc commented 2 years ago

@Yajo footnote: While all Mermaid.js features should work out-of-the-box, Material for MkDocs will currently only adjust the fonts and colors for flowcharts, sequence diagrams, class diagams, state diagrams and entity relationship diagrams.

pawamoy commented 2 years ago

That page works fine in dark mode. How do they do it?

Well I guess the mkdocs-material site is built with the insiders version of mkdocs-material, therefore supporting theme switch :slightly_smiling_face:

pawamoy commented 2 years ago

Found a way, there was actually an example in mkdocs-mermaid2-plugin docs :slightly_smiling_face: Pushing a PR