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

White text on flowchart node becomes gray when exporting as pdf #585

Open
ciriousjoker opened this issue Aug 19, 2023 · 1 comment
Open

Comments

@ciriousjoker
Copy link

ciriousjoker commented Aug 19, 2023

Description

White text on flowchart node becomes gray when exporting as pdf.

On svg, everything looks as it's supposed to.

Steps to reproduce

  1. Paste sample code into flowchart-demo.mmd
  2. Run npx mmdc --input ./flowchart-demo.mmd --configFile config-demo.json --outputFormat pdf
  3. Run npx mmdc --input ./flowchart-demo.mmd --configFile config-demo.json --outputFormat svg

Screenshots

pdf:
flowchart-demo.mmd.pdf

screenshot of pdf:
CleanShot 2023-08-19 at 06 00 16@2x

png (svg looks identical):
flowchart-demo mmd

Code Sample

config-demo.json

{
  "theme": "base",
  "themeVariables":{
    "primaryColor": "#d54008ff",
    "primaryTextColor": "#ffffff"
  }
}

flowchart-demo.mmd

flowchart TD
    SomeNode([Some Node])

Setup

  • Mermaid version: 10.3.1
  • Browser and Version: Chrome 116.0.5845.96 (official build) (arm64)

I'm on mac os. No idea which chromium version puppeteer uses under the hood.

Suggested Solutions

no idea

Additional Context

  • Code sample looks a bit different because I stripped everything that isn't relevant.
  • I tried absolutely everything to get white text on red background: switched to different theme, set fill & color in css with !important, set all possible variables that I could find
@Yokozuna59 Yokozuna59 transferred this issue from mermaid-js/mermaid Aug 19, 2023
@frederikstroem
Copy link

I am having the same issue, using https://ghcr.io/mermaid-js/mermaid-cli/mermaid-cli docker image.

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

No branches or pull requests

2 participants