-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Apply styling from css when using the CLI utility #85
Comments
Injecting CSS into the page is fairly trivial; I'm assuming this is the only requirement? I'd probably add the following option:
…then, that CSS file would be included in each file that you specified to be rendered. However, I'd also add the following caveats:
As to the margins; Phantom doesn't have a "take a screenshot of this region" function, so the way I accomplish this is by removing all margins, inspecting the width/height of the SVG element after it's rendered, and then set Phantom's viewport to that size. If someone were to mess with anything that moved it around on the page, this code would fail, and the image would be offset. If these seem like reasonable caveats, I'll implement as above. I should have time to take a look at it this week. |
That would be great! |
+1 - I wanted to use this on the command line primarily - I had to scaffold a webapp to get around it for now :) |
@fardog, is this issue still active? |
sorry for the delay on this! just submitted #116 which should resolve this issue. |
* fixEditInit: Fix Editor Init. Fixes #85
…ditor into develop * 'master' of https://github.com/mermaid-js/mermaid-live-editor: (56 commits) Release Fix Config Update Fix Editor Init. Fixes #85 Release Add deployment Fix header image Fix font path Update Monaco Editor Add stale-bot Redeploy Live Editor Release Live Editor Fix Init error #77 Fix LiveEditor Add prettierignore Release Live Editor Release Live Editor Update beta-release Create codeql-analysis.yml Change formatting Add 2021 ...
It is possible to apply styles to diagrams via css classes.
It would be cool if styling could be applied this way also when using the client utility.
This could perhaps be achieved via an option for giving a path to a css file which is then included in the rendering of the diagram.
@fardog, what do you think of this idea?
The text was updated successfully, but these errors were encountered: