mermaid-js / mermaid

Generation of diagrams like flowcharts or sequence diagrams from text in a similar manner as markdown
https://mermaid.js.org
MIT License
71.77k stars 6.51k forks source link

LinkStyle 'color' for Link Text is overridden by inline style for span #2223

Open rkc-rkc opened 3 years ago

rkc-rkc commented 3 years ago

https://github.com/mermaid-js/mermaid/blob/608445e64fec2bb5610ba8f46c8c30d1fade4d59/src/diagrams/flowchart/flowRenderer.js#L252

Given the following graph

graph LR
A("Perception") --> |convert|B("Representation")
C("Perform Algorithmus / analyze") --> |Do Stuff|B
linkStyle 0 color:blue,text-align:left;
linkStyle 1 stroke:#f3a,stroke-width:4px,fill:goldenrod;

Expectation is that the Link Text coloring reflects the value in linkStyle. However the color is what is specified for 'edgeLabel' class, which is applied to the inner span element.

Screen Shot 2021-08-05 at 10 12 51 AM
chrisbloom7 commented 5 months ago

This no longer appears to be the case and the issue can probably be closed.

screenshot showing that the color attribute of a linkStyle is applied to the edgeLabel text

Here's a more comprehensive example