mermaid-js / mermaid-cli

Command line tool for the Mermaid library
MIT License
2.31k stars 223 forks source link

CSS not used in output #602

Open aborruso opened 11 months ago

aborruso commented 11 months ago

Describe the bug I have set a CSS in config file, but it seems to be not used

To Reproduce

My config

{
  "themeCSS": "gantt.css"
}

My CSS

.grid .tick {
  stroke: rgb(199, 196, 45) !important;
  opacity: 0.5 !important;
  shape-rendering: crispEdges;
}
.grid path {
  stroke-width: 01;
}

My md

```mermaid
gantt
    title SVC S1-01
    dateFormat YYYY-MM-DD
    axisFormat %d-%m
    todayMarker off
    %%tickInterval 2days
    %%excludes    2023-10-31
    section SVC Milestones
        UV-4 validation report ORR delivery : milestone, m2, 2023-10-30, 0d
        Training material delivery : milestone, 2023-10-23, 0d
        Training demo: milestone, 2023-10-06, 0d
        Training session: milestone, ts, 2023-11-07, 0d
        Training report: milestone, tr, 2023-10-22, 0d
    section OU-S1-01-01
        GSP sample production    : 2023-10-04, 2023-10-08
        GSP sample validation    : 2023-10-04, 2023-10-09
        GSP sample delivery to PC : milestone, 2023-10-15, 0d
        Exploitation tool release : milestone, sm2, 2023-10-24, 0d
    section OU-S1-01-02
        GSP sample production    : 2023-10-04, 2023-10-08
        GSP sample validation    : 2023-10-04, 2023-10-09
        GSP sample delivery to PC : milestone, 2023-10-15, 0d
        Exploitation tool release : milestone, 2023-10-24, 0d
    section OU-S1-01-03
        GSP sample production    : 2023-10-04, 2023-10-08
        GSP sample validation    : 2023-10-04, 2023-10-09
        GSP sample delivery to PC : milestone, 2023-10-15, 0d
        Exploitation tool release : milestone, 2023-10-24, 0d
```

I run mmdc -i gantt.md --configFile config.json -o gantt.png, and the thick styles are the default.

Expected behavior

To have in the PNG the style I have set in the CSS.

Screenshots

image

Desktop (please complete the following information):

I'm using 10.4.0 version.

Thank you

robinfehr commented 6 months ago

That would be most helpful. The PDF output looks barely readable by default.