mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
Fix text label colors for flow charts
When htmlLabels is set to `false` and a background fill color is used for a node, the text label will inherit the fill color, hiding the actual text. To fix this, explicitly set the fill color to `#333`, the same value used in `src/themes/flowchart.scss`. Closes https://github.com/knsv/mermaid/issues/885
This commit is contained in:
parent
95967151ae
commit
83b7163844
@ -78,6 +78,7 @@ export const addVertices = function (vert, g, svgId) {
|
||||
tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve')
|
||||
tspan.setAttribute('dy', '1em')
|
||||
tspan.setAttribute('x', '1')
|
||||
tspan.setAttribute('fill', '#333')
|
||||
tspan.textContent = rows[j]
|
||||
svgLabel.appendChild(tspan)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user