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

mermaid 在暗黑模式下的线条完全看不清 #331

Closed
3 tasks done
fightinggg opened this issue Jul 19, 2021 · 7 comments
Closed
3 tasks done

mermaid 在暗黑模式下的线条完全看不清 #331

fightinggg opened this issue Jul 19, 2021 · 7 comments
Labels
Milestone

Comments

@fightinggg
Copy link

Please follow this Issue template to provide relevant information, such as source code repository, website URL and screenshots, which will help us investigate.
请按照此 Issue 模版提供相关信息,例如源码仓库、网站链接和屏幕截图,这将有助于我们进行调查。

Issue Checklist


Expected behavior

Actual behavior

mermaid 在暗黑模式下的线条完全看不清,我自己的Blog,甚至文档中的例子也是看不清

  • Links to demo site with this issue:
  • Links to repository or source code of the blog:
  • Screenshots:

Steps to reproduce the behavior

Look this , https://theme-next.js.org/docs/tag-plugins/mermaid.html
122988863-c36a8e80-d3d4-11eb-9612-fb6cbb684abe

Environment Information

Node.js and NPM Information


Package dependencies Information


Hexo Configuration

NexT Configuration

Other Information

@fightinggg fightinggg added the Bug Something isn't working label Jul 19, 2021
@stevenjoezhang
Copy link
Member

stevenjoezhang commented Jul 20, 2021

这个是已知问题 theme-next/hexo-theme-next#1651

需要等Mermaid解决 mermaid-js/mermaid#1544

@fightinggg
Copy link
Author

这个是已知问题 theme-next/hexo-theme-next#1651

需要等Mermaid解决 mermaid-js/mermaid#1544

那个问题也是我提的,我看没人回复以为那个仓库不用了,就来这了

@ljcbaby
Copy link
Member

ljcbaby commented Aug 1, 2021

这个是已知问题 theme-next/hexo-theme-next#1651
需要等Mermaid解决 mermaid-js/mermaid#1544

那个问题也是我提的,我看没人回复以为那个仓库不用了,就来这了

那个仓库确实不用了

@fightinggg
Copy link
Author

done

问题我解决了,最近突然发现了这个东西,你只需要在你的source/_data/styles.styl中加入下面的代码即可

.mermaid {
  text-align: center;
}

@media (prefers-color-scheme: dark) {
  .mermaid {
    background: #505050;
  }
}

效果可以参考我这里

浅色

image

深色

image

@stevenjoezhang
Copy link
Member

还是把这个 issue 开着吧,未来可能还会优化 mermaid 的配色方案,讨论见 #270

@stevenjoezhang
Copy link
Member

Fixed in debbe5b
配置文件有变化,现在需要为暗色模式单独选择一个 Mermaid 主题

@stevenjoezhang stevenjoezhang added this to the 8.8.0 milestone Sep 8, 2021
@stevenjoezhang stevenjoezhang mentioned this issue Sep 8, 2021
28 tasks
lingyf pushed a commit to lingyf/hexo-theme-next that referenced this issue Jan 27, 2022
ljcbaby pushed a commit to ljcbaby/hexo-theme-next that referenced this issue Feb 7, 2022
@github-actions
Copy link

github-actions bot commented Sep 9, 2022

This thread has been automatically locked since there has not been any recent activity after it was closed. It is possible issue was solved or at least outdated. Feel free to open new for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants