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 by 语雀 #389

Open
shy1118999 opened this issue Aug 23, 2023 · 0 comments
Open

dark mode by 语雀 #389

shy1118999 opened this issue Aug 23, 2023 · 0 comments

Comments

@shy1118999
Copy link

语雀自己的CSS中有写夜间模式,但是现在没有切换按钮
通过查看css 可以通过以下方式进行切换

html上有个属性叫data-kumuhana 通过修改它的值可以实现夜间/日间切换
default为日间
pouli为夜间
还有一个larkx-yuque-theme-light的style块会影响夜间模式的显示

document.getElementById("larkx-yuque-theme-light").remove()
document.getElementsByTagName("html")[0].setAttribute('data-kumuhana', 'pouli')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant