Skip to content

Mermaid Flowchart styles are broken

Summary

GitLab 10.8.4 Mermaid Flowcharts had centered text and centered content.

dllhost_2018-06-25_13-05-30 dllhost_2018-06-25_13-05-54

GitLab 11.0.0 changed the text to be left-aligned and the node content now starts at the top left.

chrome_2018-06-25_13-06-38 chrome_2018-06-25_13-06-48 chrome_2018-06-25_13-08-05

Steps to reproduce

Create a mermaid flowchart. See example project.

Example Project

https://gitlab.com/HitomiTenshi/mermaid-styles

What is the current bug behavior?

Top-left aligned node content.

chrome_2018-06-25_13-08-05

Note: Recent changes in mermaidjs suggest adding a <center></center> tag around text that you want to be centered instead of left-aligned. So the left-aligned text change is not a bug.

What is the expected correct behavior?

Node content should be centered (middle aligned).

dllhost_2018-06-25_13-05-54

Output of checks

This bug happens on GitLab.com and on our self-hosted instance.

Edited by Johann Rekowski