We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
/kind bug
在明暗切换下复制按钮的样式没有变化
来回切换下,亮色保持白底黑字,暗色保持黑底白字
安装 highlight.js 代码高亮 1.3.2 样式设置为 github-auto.min.css ,在亮色模式观察复制按钮样式,随后切换为暗色模式观察样式,然后刷新页面再观察样式
目前我的解决办法是注入下面样式,其中 --bc-hljs 和 --color-hljs 分别为 github-auto.min.css 的主题 background-color 和 color
--bc-hljs
--color-hljs
<style> .hljs-copy-button { --hljs-theme-background: var(--bc-hljs); --hljs-theme-color: var(--color-hljs); } </style>
主要是为了覆盖
// src/main/resources/static/plugins/highlightjs-copy.js:15 el.parentElement.style.setProperty("--hljs-theme-background", window.getComputedStyle(el).backgroundColor); el.parentElement.style.setProperty("--hljs-theme-color", window.getComputedStyle(el).color);
The text was updated successfully, but these errors were encountered:
No branches or pull requests
What type of issue is this?
/kind bug
System information:
What happened?
在明暗切换下复制按钮的样式没有变化
What did you expect to happen?
来回切换下,亮色保持白底黑字,暗色保持黑底白字
How can we reproduce it (as minimally and precisely as possible)?
安装 highlight.js 代码高亮 1.3.2 样式设置为 github-auto.min.css ,在亮色模式观察复制按钮样式,随后切换为暗色模式观察样式,然后刷新页面再观察样式
Anything else we need to know?
目前我的解决办法是注入下面样式,其中
--bc-hljs
和--color-hljs
分别为 github-auto.min.css 的主题 background-color 和 color主要是为了覆盖
The text was updated successfully, but these errors were encountered: