-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add styling for mermaid diagrams #593
Comments
Here's my first draft: Dark Mode:
Light Mode:
I'm using https://mermaid.live/ to try out different color stylings, however, I haven't been able to figure out how to change the background color. I think this needs tweaking because the diagrams will be rendered inside code blocks, so that's what I'll work on next. |
We currently have to refresh the page when switching between dark / light mode for mermaid to switch themes. Here are some random links so I don't lose them: |
Alright, I have an update on this. I reconstructed the graphs in Figma so that I could have better control over the colour values and I could easily check for contrast. Since the graphs will be generated in code blocks, I also added those colours in the background. These are the colour values I used:
I'd love to get some feedback on this, but overall I think this styling is ready. The only caveat at this point is that this only covers the basic colours and styling, and for more complicated graphs, we would need additional styling. If there's a commonly used complex graph, I can design the styling for that, otherwise this is a good base point! 👍🏼 |
@trallard @isabela-pf could you take a look and share your feedback on the new styling? |
Thanks for the tag, the good descriptions, and the clear example mockups. I found this very easy to review and I am grateful! Both in contrast checking and in matching the theme, I think these options work. I don't have any issues with the light or dark mode stylings. The only things I noticed were:
Please let me know if you have any questions! I agree with @smeragoel that this styling can be implemented and will be an improvement compared to what's currently there even without my questions addressed. More generally, I would like to ask one thing about maintenance: is there any extra maintenance load, dependencies, or anything else that comes from switching from default mermaid diagram colors to bespoke ones? |
There should not be any extra dependencies needed or maintenance burden once the colour scheme is implemented. |
Currently, mermaid diagrams are using default colours for styling: https://theme.scientific-python.org/features/#mermaid-diagrams which do not match the theme colors, and don't pass WCAG colour contrast standards.
The text was updated successfully, but these errors were encountered: