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

Remove "forest.css" in Mermaid #1156

Closed
wants to merge 1 commit into from
Closed

Remove "forest.css" in Mermaid #1156

wants to merge 1 commit into from

Conversation

Gowa2017
Copy link
Contributor

@Gowa2017 Gowa2017 commented Feb 24, 2020

在新版本的Mermaid中已经不需要。而加上这个css文件会影响graphviz里面node的样式


This is unnecessary in new Mermaid. This CSS file will affect node style in Graphviz.

Closes #1138

@FranklinYu
Copy link
Member

Both the method mermaidStylesheets and the file mermaid.forest.css were introduced in #865. The CSS file looks like a theme. According to unpkg, Mermaid team stop providing those theme files (including “forest”, “neutral”, and “dark”) since 7.0.11 release. Do you know what’s the current way to apply the forest theme?


你知道最新的Mermaid怎么改主题么?最好能保持使用Forest主题。

@FranklinYu FranklinYu changed the title 取消mermaid的forest.css 文件,在新版本的mermaid 中已经不需要。而加上这个css 文件会影响graphviz 里面… Remove "forest.css" in Mermaid Feb 26, 2020
@Gowa2017
Copy link
Contributor Author

Gowa2017 commented Feb 27, 2020

From the mermaid official document, http://mermaid-js.github.io/mermaid/#/mermaidAPI?id=mermaidapi-configuration-defaults, in version 8, we can use mermaid.initialize(config); to setting the mermaid, like

var config = {
    theme:'default',
    logLevel:'fatal',
    securityLevel:'strict',
    startOnLoad:true
}
mermaid.initialize(config);

theme can be http://mermaid-js.github.io/mermaid/#/mermaidAPI?id=theme.

@FranklinYu
Copy link
Member

That's nice. I would prefer to do all related things in a single PR.

  1. Remove the related part in MPRenderer.m (instead of only commenting it out). We can easily revert the change if we regret. That's the point for Git.
  2. Remove the Mermaid style sheet.
  3. Update MacDown/Resources/Extensions/mermaid.init.js accordingly.

@Gowa2017
Copy link
Contributor Author

#1165

Now, please close this issue

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

Successfully merging this pull request may close these issues.

Graphviz's filled and color attributes doesn't work
2 participants