mermaid-js / mermaid-cli

Command line tool for the Mermaid library
MIT License
2.48k stars 234 forks source link

Ignoring custom css #473

Closed tstarbow-sfdc closed 1 year ago

tstarbow-sfdc commented 1 year ago

Describe the bug Values in custom css included with --cssFile are being ignored. To confirm, I pulled down the source code and ran the example from in the Readme, and that isn't working for me either.

To Reproduce mmdc --input test-positive/flowchart1.mmd --cssFile test-positive/flowchart1.css -o docs/animated-flowchart2.svg

Expected behavior When I open animated-flowchart2.svg in chrome it should show animated dashed lines (like downloaded animated-flowchart.svg does), instead it just shows static lines.

Desktop (please complete the following information):

mmdc --version 1 9.3.0

Installed with:

npm install -g @mermaid-js/mermaid-cli

tstarbow-sfdc commented 1 year ago

Ok, my mistake. It isn't that the css is being ignored, it's just that it is out-of-date. If you change test-positive/flowchart1.css to match what is really in the generated svg file, it works as expected.

.edge-pattern-solid  {
  stroke-dasharray: 6  !important;
  animation: dash 30s linear infinite;
}

.nodeLabel {
  font-family: "fantasy" !important;
}