Skip to content
This repository has been archived by the owner on Jul 22, 2023. It is now read-only.

Passing an optional stylesheet does nothing on sequence diagrams #28

Closed
ghost opened this issue Mar 3, 2018 · 3 comments
Closed

Passing an optional stylesheet does nothing on sequence diagrams #28

ghost opened this issue Mar 3, 2018 · 3 comments

Comments

@ghost
Copy link

ghost commented Mar 3, 2018

As the title says, I am trying to pass an optional stylesheet for a sequence diagram but it outputs a file, svg, png or pdf without applying it. Tried several configurations on the .css file without success. Here is a simple one I tried:

.actor {
  stroke:black;
  fill:none;
}

text.actor {
  fill:black;
  stroke:none;
  font-family:Arial, Helvetica, sans-serif;
}

.actor-line {
  stroke:black;
}

And on the command line:

mmdc -i seqdiagram.mmd -o seqdiagram.png -C stylesheet.css

I do not seem to be doing anything wrong. I wonder if everyone else is unable to apply an optional stylesheet to sequence diagrams?

@ghost
Copy link
Author

ghost commented Mar 3, 2018

The problem seems to be on the mermaid.cli side, as I can change the style for all elements on mermaid's webpage using the developer tools. Here's a screenshot:

screenshot_2

For some weird reason, with a similar diagram and stylesheet as the above, I am only able to change the font-family for .labelText, .loopText, .messageText and text.actor but not .noteText on the command line.

@agusmba
Copy link
Contributor

agusmba commented Mar 5, 2018

This is a problem with the core library, see mermaid-js/mermaid#587
Following the "official" way of setting the css does not work for all the items it should.

See also #24 for a PR which would also fix this, but it's on hold since it should be fixed in the core library.

@tylerlong
Copy link
Contributor

Please refer to #24 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants