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

开启 Dark Mode 后使用 prism 时 light 和 dark 不能设置相同主题 #67

Closed
3 tasks done
zhaoyibo opened this issue Jul 30, 2020 · 6 comments
Closed
3 tasks done
Labels
Bug Something isn't working CSS Solved
Milestone

Comments

@zhaoyibo
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

想在浅色和深色时使用同一套 prism theme

Actual behavior

  • Links to demo site with this issue:
  • Links to repository or source code of the blog:
  • Screenshots:
    Xnip2020-07-30_23-02-14
    Xnip2020-07-30_23-00-56

Steps to reproduce the behavior

开启 darkmode: true
关闭 highlight 开启 prismjs

highlight:
  enable: false
  line_number: true
  auto_detect: false
  tab_replace:
prismjs:
  enable: true

主题配置成一样的

  prism:
    light: prism-xonokai
    dark: prism-xonokai

主题试过 prism-hopscotchprism-nord 均是一样的问题。
只要将 darkmode 关了或者主题的 light、dark 设置不同,就没有问题

Environment Information

Node.js and NPM Information

v14.6.0
6.14.7

Package dependencies Information

├── hexo@5.0.0
├── hexo-abbrlink@2.2.1
├── hexo-algolia@1.3.1
├── hexo-deployer-rsync@1.0.0
├── hexo-generator-archive@1.0.0
├── hexo-generator-category@1.0.0
├── hexo-generator-feed@2.2.0
├── hexo-generator-index@1.0.0
├── hexo-generator-indexed@1.2.0
├── hexo-generator-searchdb@1.3.2
├── hexo-generator-sitemap@2.0.0
├── hexo-generator-tag@1.0.0
├── hexo-renderer-ejs@1.0.0
├── hexo-renderer-marked@2.0.0
├── hexo-renderer-stylus@1.1.0
├── hexo-server@1.0.0
├── hexo-submit-urls-to-search-engine@1.0.1
└── prism-themes@1.4.0

Hexo Configuration

highlight:
  enable: false
  line_number: true
  auto_detect: false
  tab_replace:
prismjs:
  enable: true

NexT Configuration

# Dark Mode
darkmode: true

codeblock:
  # Code Highlight theme
  # All available themes: https://theme-next.js.org/highlight/
  theme:
    light: default
    dark: tomorrow-night-eighties
  prism:
    light: prism-xonokai
    dark: prism-xonokai
  # Add copy button on codeblock
  copy_button:
    enable: false
    # Available values: default | flat | mac
    style: mac

Other Information

Browser:Google Chrome 84.0.4147.89(正式版本) (64 位)
System:macOS 10.15.5

@zhaoyibo zhaoyibo added the Bug Something isn't working label Jul 30, 2020
@welcome
Copy link

welcome bot commented Jul 30, 2020

Thanks for opening this issue, maintainers will get back to you as soon as possible!

@stevenjoezhang
Copy link
Member

stevenjoezhang commented Jul 30, 2020

Thanks for your feedback. Fixed in 33723be

See also theme-next/hexo-theme-next#1580

@zhaoyibo
Copy link
Author

感谢!使用相同主题已经不冲突了。

但是在 prism-nord 主题下出现了新的问题,行号和内容错开了
QQ20200731-102422@2x

之前是没有这个问题的,另外试了别的另外两个主题也没此问题 prism-vsc-dark-plusprism-xonokai

@stevenjoezhang
Copy link
Member

我感觉这是 prism-nord 本身的问题(行间距太大了),可以在这里提个 Issue 反馈一下: https://github.com/PrismJS/prism-themes/issues

@zhaoyibo
Copy link
Author

我感觉这是 prism-nord 本身的问题(行间距太大了),可以在这里提个 Issue 反馈一下: https://github.com/PrismJS/prism-themes/issues

好的,谢谢~

@github-actions
Copy link

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 Nov 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Something isn't working CSS Solved
Projects
None yet
Development

No branches or pull requests

2 participants