Skip to content
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

Fix text label colors for flow charts #886

Merged
merged 2 commits into from
Jul 21, 2019

Conversation

stanhu
Copy link
Contributor

@stanhu stanhu commented 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 #333 in the SCSS.

Closes #885

@stanhu
Copy link
Contributor Author

stanhu commented Jul 21, 2019

@knsv Is there a way to set the color based on the .label SCSS in src/themes/flowchart.scss?

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
@coveralls
Copy link

coveralls commented Jul 21, 2019

Pull Request Test Coverage Report for Build 851

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 53.22%

Totals Coverage Status
Change from base Build 847: 0.0%
Covered Lines: 2393
Relevant Lines: 4452

💛 - Coveralls

@knsv
Copy link
Collaborator

knsv commented Jul 21, 2019

You can style that in css using something like this.

.label text { fill: red}

Maybe you could update your pull request to fix the issue that way?

@stanhu
Copy link
Contributor Author

stanhu commented Jul 21, 2019

Oh, thanks! That works much better.

@knsv knsv merged commit e679556 into mermaid-js:master Jul 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Text not readable with fill styling when htmlLabels false
3 participants