-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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 CSS variables for Mermaid sequence diagrams #5940
Add CSS variables for Mermaid sequence diagrams #5940
Conversation
Thanks for the PR! Skimming through the PR, my first reaction is: looks really good! I'll review this PR in the coming days, so we can quickly merge it. Then, we should do the same for all other diagram types |
Sounds great! Sure, once you've approved this approach, I can apply it to the other diagram types as well. |
Looks great! We'd be happy to accept PRs for the other diagram types as well |
Note that for now, we'll not going to advertise it on the docs, because I'm not yet entirely sure about the naming conventions. We might change the naming a little in the end, but for that to know we need the other types. Always better to decide when you see the whole picture. However, we'll ship it now with 9.2.7. |
I've added CSS variables for Mermaid sequence diagrams to ease customization. I've also improved the note style to align better with the rest of the theme. Except for the note style, all other CSS variables use the previous styles as defaults.
The rationale of the CSS variables is this:
--md-mermaid-sequence-<component>-*
.*-fg-color
maps to text color – seems consistent with existing variable names*-bg-color
maps to shape background color (fill
)*-border-color
maps to shape border color (stroke
)*-line-color
maps to line color (typicallystroke
,fill
for arrowhead)I've added a commit for each component to make the changes per component easier to check.
WDYT, @squidfunk @nejch?
Resolves #5824.