-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
Text not readable with fill styling when htmlLabels false #885
Comments
stanhu
changed the title
Text not readable with styling when htmlLabels false
Text not readable with fill styling when htmlLabels false
Jul 21, 2019
It looks like the diff --git a/src/diagrams/flowchart/flowRenderer.js b/src/diagrams/flowchart/flowRenderer.js
index 3fb9a31..1d7eb46 100644
--- a/src/diagrams/flowchart/flowRenderer.js
+++ b/src/diagrams/flowchart/flowRenderer.js
@@ -79,6 +79,7 @@ export const addVertices = function (vert, g, svgId) {
tspan.setAttribute('dy', '1em')
tspan.setAttribute('x', '1')
tspan.textContent = rows[j]
+ tspan.setAttribute('fill', 'black')
svgLabel.appendChild(tspan)
}
vertexNode = svgLabel |
stanhu
added a commit
to stanhu/mermaid
that referenced
this issue
Jul 21, 2019
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 mermaid-js#333. Closes mermaid-js#885
stanhu
added a commit
to stanhu/mermaid
that referenced
this issue
Jul 21, 2019
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 `mermaid-js#333`, the same value used in `src/themes/flowchart.scss`. Closes mermaid-js#885
This was referenced Jan 25, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When
htmlLabels
is set tofalse
, the text in a flow diagram doesn't show when styling the background.To Reproduce
Initiate Mermaid with
htmlLabels: false
and use this diagram:Expected behavior
When
htmlLabels: true
, this is how it looks:Screenshots
However, this is what actually happens:
The
htmlLabels: true
case produces this:While
htmlLabels: false
case produces this:Desktop (please complete the following information):
MacOS Mojave 10.14.12
Chrome 75.0.3770.142
The text was updated successfully, but these errors were encountered: