chore: 整理 third-party Dark Reader 目录并移除本地说明文件跟踪
This commit is contained in:
+1
-1
@@ -23,7 +23,7 @@
|
||||
"@halo-dev/ui-shared": "^2.25.1",
|
||||
"axios": "^1.13.5",
|
||||
"canvas-confetti": "^1.9.3",
|
||||
"darkreader": "file:./vendor/darkreader",
|
||||
"darkreader": "file:../third-party/darkreader",
|
||||
"vue": "^3.5.28"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
Generated
+32
-5
@@ -24,8 +24,8 @@ importers:
|
||||
specifier: ^1.9.3
|
||||
version: 1.9.4
|
||||
darkreader:
|
||||
specifier: file:./vendor/darkreader
|
||||
version: file:vendor/darkreader
|
||||
specifier: file:../third-party/darkreader
|
||||
version: file:../third-party/darkreader
|
||||
vue:
|
||||
specifier: ^3.5.28
|
||||
version: 3.5.41(typescript@5.8.3)
|
||||
@@ -562,6 +562,17 @@ packages:
|
||||
'@rolldown/pluginutils@1.0.1':
|
||||
resolution: {integrity: sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==}
|
||||
|
||||
'@rollup/rollup-linux-x64-gnu@4.62.4':
|
||||
resolution: {integrity: sha512-W69hukhZ3KKNRCaMIEzKvcFye42hh0FE1+YoYaf5+Ikacuftoco6yO/xouz0hc5d5W/s3yBro5jRiuEE/Q5vUw==}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
libc: [glibc]
|
||||
|
||||
'@rollup/rollup-win32-x64-msvc@4.62.4':
|
||||
resolution: {integrity: sha512-zD6NdeWEByGE9QF9vCrlJ5YQB4oq9q91kPZS37Jwj5hOkvR1lTBSpsKhKDw4IJtbQ35LsTS1HD9DZYGKIshU1Q==}
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
|
||||
'@rsbuild/core@2.1.10':
|
||||
resolution: {integrity: sha512-lwxC5w88U2AMv6aNwG3VH7+AV33N4JJQjD//egVWFsMbV+OE/bnfCsurSpX8s3lGyRYkJMwUVN+YXMbmmYZFfw==}
|
||||
engines: {node: ^20.19.0 || >=22.12.0}
|
||||
@@ -1085,8 +1096,8 @@ packages:
|
||||
csstype@3.2.3:
|
||||
resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==}
|
||||
|
||||
darkreader@file:vendor/darkreader:
|
||||
resolution: {directory: vendor/darkreader, type: directory}
|
||||
darkreader@file:../third-party/darkreader:
|
||||
resolution: {directory: ../third-party/darkreader, type: directory}
|
||||
|
||||
data-urls@5.0.0:
|
||||
resolution: {integrity: sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==}
|
||||
@@ -1616,6 +1627,9 @@ packages:
|
||||
magic-string@0.30.21:
|
||||
resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==}
|
||||
|
||||
malevic@0.20.2:
|
||||
resolution: {integrity: sha512-s44yEUyfDaONt7nPT7NDQ+Z2oAswErG70ok2Q95bJFh1Bdcn4dZQVMrLE02ZIjTtYfQ/LFOVxF+yB3bdGw/GtQ==}
|
||||
|
||||
math-intrinsics@1.1.0:
|
||||
resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==}
|
||||
engines: {node: '>= 0.4'}
|
||||
@@ -2741,6 +2755,12 @@ snapshots:
|
||||
|
||||
'@rolldown/pluginutils@1.0.1': {}
|
||||
|
||||
'@rollup/rollup-linux-x64-gnu@4.62.4':
|
||||
optional: true
|
||||
|
||||
'@rollup/rollup-win32-x64-msvc@4.62.4':
|
||||
optional: true
|
||||
|
||||
'@rsbuild/core@2.1.10':
|
||||
dependencies:
|
||||
'@rspack/core': 2.1.8(@swc/helpers@0.5.23)
|
||||
@@ -3320,7 +3340,12 @@ snapshots:
|
||||
|
||||
csstype@3.2.3: {}
|
||||
|
||||
darkreader@file:vendor/darkreader: {}
|
||||
darkreader@file:../third-party/darkreader:
|
||||
dependencies:
|
||||
malevic: 0.20.2
|
||||
optionalDependencies:
|
||||
'@rollup/rollup-linux-x64-gnu': 4.62.4
|
||||
'@rollup/rollup-win32-x64-msvc': 4.62.4
|
||||
|
||||
data-urls@5.0.0:
|
||||
dependencies:
|
||||
@@ -3830,6 +3855,8 @@ snapshots:
|
||||
dependencies:
|
||||
'@jridgewell/sourcemap-codec': 1.5.5
|
||||
|
||||
malevic@0.20.2: {}
|
||||
|
||||
math-intrinsics@1.1.0: {}
|
||||
|
||||
memorystream@0.3.1: {}
|
||||
|
||||
+1
-3
@@ -4,11 +4,9 @@ import { markRaw } from 'vue'
|
||||
import './styles/index.css'
|
||||
import { initDarkReaderEngine } from './darkreader-engine'
|
||||
import { injectThemeToggle } from './injector'
|
||||
import { initMonacoThemeSync } from './monaco-theme'
|
||||
|
||||
// 在插件加载后将切换器注入到侧边栏,并让 Monaco 跟随主题
|
||||
// 在插件加载后将切换器注入到侧边栏,暗色转换完全交给 Dark Reader
|
||||
injectThemeToggle()
|
||||
initMonacoThemeSync()
|
||||
initDarkReaderEngine()
|
||||
|
||||
export default definePlugin({
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
/**
|
||||
* 让 Monaco Editor(日志查看器)跟随 Halo 暗色模式。
|
||||
* 优先调用 Monaco 官方主题 API,CSS 兜底见 styles/overrides/editor.css。
|
||||
*/
|
||||
|
||||
type MonacoLike = {
|
||||
editor?: {
|
||||
setTheme: (name: string) => void
|
||||
}
|
||||
}
|
||||
|
||||
const DARK_THEME = 'vs-dark'
|
||||
const LIGHT_THEME = 'vs'
|
||||
|
||||
function getMonaco(): MonacoLike | undefined {
|
||||
return (window as unknown as { monaco?: MonacoLike }).monaco
|
||||
}
|
||||
|
||||
function applyMonacoTheme(): void {
|
||||
const monaco = getMonaco()
|
||||
if (!monaco?.editor?.setTheme) return
|
||||
const isDark = document.documentElement.getAttribute('data-halo-theme') === 'dark'
|
||||
monaco.editor.setTheme(isDark ? DARK_THEME : LIGHT_THEME)
|
||||
}
|
||||
|
||||
/** 初始化 Monaco 主题同步:立即应用,并监听属性变化与实例懒加载。 */
|
||||
export function initMonacoThemeSync(): void {
|
||||
applyMonacoTheme()
|
||||
|
||||
const attributeObserver = new MutationObserver(() => applyMonacoTheme())
|
||||
attributeObserver.observe(document.documentElement, {
|
||||
attributes: true,
|
||||
attributeFilter: ['data-halo-theme'],
|
||||
})
|
||||
|
||||
// 日志页面可能懒加载 Monaco,实例渲染后再补一次
|
||||
const instanceObserver = new MutationObserver(() => {
|
||||
if (document.querySelector('.monaco-editor')) {
|
||||
applyMonacoTheme()
|
||||
}
|
||||
})
|
||||
instanceObserver.observe(document.body, { childList: true, subtree: true })
|
||||
}
|
||||
+2
-11
@@ -1,15 +1,6 @@
|
||||
/* ============================================================
|
||||
Halo Dark Mode — 样式入口
|
||||
按加载顺序导入所有样式文件
|
||||
仅保留插件自身 UI 变量;页面暗色转换完全交给 Dark Reader。
|
||||
============================================================ */
|
||||
|
||||
@import './variables.css';
|
||||
@import './overrides/halo-core.css';
|
||||
@import './overrides/plugin-pages.css';
|
||||
@import './overrides/uno-fallback.css';
|
||||
@import './overrides/utilities.css';
|
||||
@import './overrides/layout.css';
|
||||
@import './overrides/components.css';
|
||||
@import './overrides/forms.css';
|
||||
@import './overrides/editor.css';
|
||||
@import './overrides/scrollbar.css';
|
||||
@import './variables.css';
|
||||
@@ -1,70 +0,0 @@
|
||||
/* ============================================================
|
||||
Halo Dark Mode — Halo 组件库覆盖(已清理)
|
||||
已删除 Halo 2.25 中不存在的 Vuetify 类(.v-card 等),
|
||||
真实 DOM 类覆盖请优先维护 halo-core.css。
|
||||
============================================================ */
|
||||
|
||||
[data-halo-theme="dark"] {
|
||||
/* ===== 模态框(具体类 + !important,防被核心 scoped 样式覆盖) ===== */
|
||||
.modal-content,
|
||||
.modal-header,
|
||||
.modal-body,
|
||||
.modal-footer {
|
||||
background-color: var(--halo-bg-card) !important;
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
|
||||
/* ===== 表格 VTable ===== */
|
||||
table {
|
||||
background-color: var(--halo-bg-card);
|
||||
color: var(--halo-text-primary);
|
||||
}
|
||||
|
||||
thead,
|
||||
.table-header {
|
||||
background-color: var(--halo-table-header-bg);
|
||||
}
|
||||
|
||||
thead th,
|
||||
.table-header th {
|
||||
color: var(--halo-text-secondary);
|
||||
border-color: var(--halo-table-border);
|
||||
}
|
||||
|
||||
tbody td,
|
||||
.table-body td {
|
||||
border-color: var(--halo-table-border);
|
||||
}
|
||||
|
||||
tbody tr:hover,
|
||||
.table-row:hover {
|
||||
background-color: var(--halo-table-row-hover);
|
||||
}
|
||||
|
||||
/* ===== 分页 ===== */
|
||||
.pagination {
|
||||
color: var(--halo-text-secondary);
|
||||
}
|
||||
|
||||
.pagination .active {
|
||||
background-color: var(--halo-accent-primary);
|
||||
color: var(--halo-accent-primary-text);
|
||||
}
|
||||
|
||||
/* ===== 面包屑 ===== */
|
||||
.breadcrumb {
|
||||
color: var(--halo-text-secondary);
|
||||
}
|
||||
|
||||
.breadcrumb a {
|
||||
color: var(--halo-text-link);
|
||||
}
|
||||
|
||||
/* ===== Toast / 通知 ===== */
|
||||
.toast-notification,
|
||||
[class*="toast"] {
|
||||
background-color: var(--halo-bg-card);
|
||||
color: var(--halo-text-primary);
|
||||
border-color: var(--halo-border-base);
|
||||
}
|
||||
}
|
||||
@@ -1,263 +0,0 @@
|
||||
/* ============================================================
|
||||
Halo Dark Mode — 富文本编辑器覆盖
|
||||
@halo-dev/richtext-editor + TipTap / ProseMirror
|
||||
+ Bytemd (Markdown 编辑器) + CodeMirror
|
||||
============================================================ */
|
||||
|
||||
[data-halo-theme="dark"] {
|
||||
/* ===== Bytemd Markdown 编辑器 ===== */
|
||||
.bytemd {
|
||||
background-color: var(--halo-bg-card) !important;
|
||||
color: var(--halo-text-primary) !important;
|
||||
border-color: var(--halo-border-base) !important;
|
||||
}
|
||||
.bytemd-toolbar {
|
||||
background-color: var(--halo-bg-content) !important;
|
||||
color: var(--halo-text-primary) !important;
|
||||
border-color: var(--halo-border-light) !important;
|
||||
}
|
||||
.bytemd-toolbar-icon {
|
||||
color: var(--halo-text-secondary) !important;
|
||||
}
|
||||
.bytemd-toolbar-icon:hover {
|
||||
background-color: var(--halo-bg-hover) !important;
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
.bytemd-toolbar-tab-active,
|
||||
.bytemd-toolbar-icon-active {
|
||||
color: var(--halo-accent-primary) !important;
|
||||
}
|
||||
.bytemd-editor,
|
||||
.bytemd-editor .CodeMirror {
|
||||
background-color: var(--halo-bg-input) !important;
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
.bytemd-preview {
|
||||
background-color: var(--halo-bg-card) !important;
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
.bytemd-status,
|
||||
.bytemd-status-right,
|
||||
.bytemd-status-left {
|
||||
background-color: var(--halo-bg-content) !important;
|
||||
color: var(--halo-text-secondary) !important;
|
||||
border-color: var(--halo-border-light) !important;
|
||||
}
|
||||
.bytemd-dropdown,
|
||||
.bytemd-dropdown-menu,
|
||||
[class*="bytemd-dropdown"] {
|
||||
background-color: var(--halo-bg-dropdown) !important;
|
||||
color: var(--halo-text-primary) !important;
|
||||
border-color: var(--halo-border-base) !important;
|
||||
}
|
||||
.bytemd-dropdown-title {
|
||||
color: var(--halo-text-secondary) !important;
|
||||
}
|
||||
.bytemd-dropdown-item {
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
.bytemd-dropdown-item:hover {
|
||||
background-color: var(--halo-bg-hover) !important;
|
||||
}
|
||||
.bytemd-sidebar,
|
||||
.bytemd-toc,
|
||||
.bytemd-toc ul,
|
||||
.bytemd-toc li {
|
||||
background-color: var(--halo-bg-content) !important;
|
||||
color: var(--halo-text-secondary) !important;
|
||||
}
|
||||
.bytemd-toc-active {
|
||||
background-color: var(--halo-bg-hover) !important;
|
||||
color: var(--halo-accent-primary) !important;
|
||||
}
|
||||
.bytemd-floating-btn {
|
||||
background-color: var(--halo-bg-card) !important;
|
||||
color: var(--halo-text-secondary) !important;
|
||||
border-color: var(--halo-border-base) !important;
|
||||
}
|
||||
.bytemd-floating-btn:hover {
|
||||
background-color: var(--halo-bg-hover) !important;
|
||||
}
|
||||
.bytemd-floating-btn.active {
|
||||
background-color: var(--halo-bg-active) !important;
|
||||
color: var(--halo-accent-primary) !important;
|
||||
}
|
||||
.bytemd-code-theme-toggle,
|
||||
.bytemd-copy-code-btn,
|
||||
[class*="bytemd"] button {
|
||||
color: var(--halo-text-secondary) !important;
|
||||
}
|
||||
.bytemd-copy-code-btn:hover,
|
||||
[class*="bytemd"] button:hover {
|
||||
color: var(--halo-text-primary) !important;
|
||||
background-color: var(--halo-bg-hover) !important;
|
||||
}
|
||||
/* 编辑器内 markdown 正文 */
|
||||
.bytemd-preview .markdown-body,
|
||||
.bytemd-editor .markdown-body {
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
.bytemd-preview .markdown-body p,
|
||||
.bytemd-preview .markdown-body li,
|
||||
.bytemd-preview .markdown-body h1,
|
||||
.bytemd-preview .markdown-body h2,
|
||||
.bytemd-preview .markdown-body h3,
|
||||
.bytemd-preview .markdown-body h4,
|
||||
.bytemd-preview .markdown-body td,
|
||||
.bytemd-preview .markdown-body th,
|
||||
.bytemd-preview .markdown-body blockquote {
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
.bytemd-preview .markdown-body code,
|
||||
.bytemd-preview .markdown-body pre,
|
||||
.bytemd-preview .markdown-body pre code {
|
||||
background-color: oklch(22% 0.02 250) !important;
|
||||
color: oklch(85% 0.05 160) !important;
|
||||
}
|
||||
.bytemd-preview .markdown-body table tr,
|
||||
.bytemd-preview .markdown-body table tr:nth-child(2n) {
|
||||
background-color: var(--halo-bg-card) !important;
|
||||
}
|
||||
.bytemd-preview .markdown-body table td,
|
||||
.bytemd-preview .markdown-body table th {
|
||||
border-color: var(--halo-border-base) !important;
|
||||
}
|
||||
|
||||
/* ===== CodeMirror 代码编辑器 ===== */
|
||||
.CodeMirror {
|
||||
background-color: var(--halo-bg-input) !important;
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
.CodeMirror-gutters {
|
||||
background-color: var(--halo-bg-content) !important;
|
||||
border-color: var(--halo-border-light) !important;
|
||||
}
|
||||
.CodeMirror-linenumber {
|
||||
color: var(--halo-text-tertiary) !important;
|
||||
}
|
||||
.CodeMirror-cursor {
|
||||
border-color: var(--halo-text-primary) !important;
|
||||
}
|
||||
.CodeMirror-selected {
|
||||
background-color: oklch(30% 0.04 160 / 50%) !important;
|
||||
}
|
||||
.cm-s-default .cm-header,
|
||||
.cm-s-default .cm-strong,
|
||||
.cm-s-default .cm-em,
|
||||
.cm-s-default .cm-link,
|
||||
.cm-s-default .cm-url {
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
.cm-s-default .cm-comment {
|
||||
color: var(--halo-text-tertiary) !important;
|
||||
}
|
||||
.cm-s-default .cm-quote {
|
||||
color: var(--halo-accent-success) !important;
|
||||
}
|
||||
.cm-s-default .cm-tag {
|
||||
color: var(--halo-accent-primary) !important;
|
||||
}
|
||||
.CodeMirror pre.CodeMirror-placeholder {
|
||||
color: var(--halo-text-tertiary) !important;
|
||||
}
|
||||
.CodeMirror-activeline-background {
|
||||
background-color: var(--halo-bg-hover) !important;
|
||||
}
|
||||
.CodeMirror-lines {
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
|
||||
/* ===== ProseMirror / TipTap 编辑器主体 ===== */
|
||||
.ProseMirror,
|
||||
.tiptap,
|
||||
[class*="editor-content"] {
|
||||
color: var(--halo-text-primary);
|
||||
background-color: var(--halo-bg-input);
|
||||
}
|
||||
|
||||
/* ===== 编辑器菜单栏 ===== */
|
||||
.editor-toolbar,
|
||||
.editor-menubar,
|
||||
[class*="editor-toolbar"],
|
||||
[class*="editor-menubar"] {
|
||||
background-color: var(--halo-bg-card);
|
||||
border-color: var(--halo-border-base);
|
||||
}
|
||||
|
||||
.editor-toolbar button,
|
||||
.editor-menubar button {
|
||||
color: var(--halo-text-secondary);
|
||||
}
|
||||
|
||||
.editor-toolbar button:hover,
|
||||
.editor-menubar button:hover,
|
||||
.editor-toolbar button.is-active,
|
||||
.editor-menubar button.is-active {
|
||||
background-color: var(--halo-bg-hover);
|
||||
color: var(--halo-text-primary);
|
||||
}
|
||||
|
||||
/* ===== 代码块 ===== */
|
||||
.ProseMirror pre,
|
||||
.ProseMirror code,
|
||||
.tiptap pre,
|
||||
.tiptap code {
|
||||
background-color: oklch(20% 0.015 250);
|
||||
color: oklch(85% 0.03 160);
|
||||
}
|
||||
|
||||
/* ===== Bubble menu / floating menu ===== */
|
||||
.tippy-box,
|
||||
.tiptap-bubble-menu,
|
||||
.floating-menu {
|
||||
background-color: var(--halo-bg-dropdown);
|
||||
border-color: var(--halo-border-base);
|
||||
color: var(--halo-text-primary);
|
||||
}
|
||||
|
||||
/* ===== 编辑器占位符 ===== */
|
||||
.ProseMirror p.is-editor-empty:first-child::before {
|
||||
color: var(--halo-text-tertiary);
|
||||
}
|
||||
|
||||
/* ===== 链接 ===== */
|
||||
.ProseMirror a,
|
||||
.tiptap a {
|
||||
color: var(--halo-text-link);
|
||||
}
|
||||
|
||||
/* ===== 选中文字 ===== */
|
||||
.ProseMirror ::selection,
|
||||
.tiptap ::selection {
|
||||
background-color: oklch(30% 0.04 160 / 50%);
|
||||
}
|
||||
}
|
||||
/* ===== Monaco Editor(日志查看器,JS 主题优先,此处仅兜底) ===== */
|
||||
html[data-halo-theme="dark"] .monaco-editor.vs,
|
||||
html[data-halo-theme="dark"] .monaco-editor.vs .margin,
|
||||
html[data-halo-theme="dark"] .monaco-editor.vs .lines-content,
|
||||
html[data-halo-theme="dark"] .monaco-editor.vs .monaco-scrollable-element {
|
||||
background-color: var(--halo-bg-input) !important;
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
html[data-halo-theme="dark"] .monaco-editor.vs .line-numbers {
|
||||
color: var(--halo-text-tertiary) !important;
|
||||
}
|
||||
html[data-halo-theme="dark"] .monaco-editor.vs .cursor {
|
||||
border-color: var(--halo-text-primary) !important;
|
||||
}
|
||||
html[data-halo-theme="dark"] .monaco-editor.vs .selected-text,
|
||||
html[data-halo-theme="dark"] .monaco-editor.vs .view-overlays .selected-text {
|
||||
background-color: oklch(30% 0.04 160 / 50%) !important;
|
||||
}
|
||||
html[data-halo-theme="dark"] .monaco-editor.vs .find-widget,
|
||||
html[data-halo-theme="dark"] .monaco-editor.vs .monaco-hover {
|
||||
background-color: var(--halo-bg-dropdown) !important;
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
|
||||
/* ===== 编辑器链接(覆盖通用链接色规则) ===== */
|
||||
html[data-halo-theme="dark"] .ProseMirror a,
|
||||
html[data-halo-theme="dark"] .tiptap a {
|
||||
color: var(--halo-text-link) !important;
|
||||
}
|
||||
@@ -1,102 +0,0 @@
|
||||
/* ============================================================
|
||||
Halo Dark Mode — FormKit 表单组件覆盖
|
||||
覆盖输入框、选择器、开关、复选框等表单元素
|
||||
============================================================ */
|
||||
|
||||
[data-halo-theme="dark"] {
|
||||
/* ===== 输入框 ===== */
|
||||
input[type="text"],
|
||||
input[type="password"],
|
||||
input[type="email"],
|
||||
input[type="number"],
|
||||
input[type="search"],
|
||||
input[type="url"],
|
||||
input[type="tel"],
|
||||
textarea,
|
||||
select,
|
||||
.formkit-input,
|
||||
[data-formkit-input] {
|
||||
background-color: var(--halo-bg-input);
|
||||
color: var(--halo-text-primary);
|
||||
border-color: var(--halo-border-input);
|
||||
}
|
||||
|
||||
input:focus,
|
||||
textarea:focus,
|
||||
select:focus,
|
||||
.formkit-input:focus {
|
||||
border-color: var(--halo-border-focus);
|
||||
outline-color: var(--halo-border-focus);
|
||||
}
|
||||
|
||||
input::placeholder,
|
||||
textarea::placeholder,
|
||||
.formkit-input::placeholder {
|
||||
color: var(--halo-text-tertiary);
|
||||
}
|
||||
|
||||
input:disabled,
|
||||
textarea:disabled,
|
||||
select:disabled {
|
||||
background-color: var(--halo-bg-disabled);
|
||||
color: var(--halo-text-tertiary);
|
||||
}
|
||||
|
||||
/* ===== 复选框/单选框 ===== */
|
||||
input[type="checkbox"],
|
||||
input[type="radio"],
|
||||
.formkit-checkbox,
|
||||
.formkit-radio {
|
||||
accent-color: var(--halo-accent-primary);
|
||||
}
|
||||
|
||||
/* ===== FormKit 标签和帮助文本 ===== */
|
||||
.formkit-label,
|
||||
.formkit-legend {
|
||||
color: var(--halo-text-secondary);
|
||||
}
|
||||
|
||||
.formkit-help,
|
||||
.formkit-message {
|
||||
color: var(--halo-text-tertiary);
|
||||
}
|
||||
|
||||
/* ===== FormKit 外层 ===== */
|
||||
.formkit-outer {
|
||||
color: var(--halo-text-primary);
|
||||
}
|
||||
|
||||
/* ===== FormKit 前缀/后缀 ===== */
|
||||
.formkit-prefix,
|
||||
.formkit-suffix {
|
||||
background-color: var(--halo-bg-hover);
|
||||
color: var(--halo-text-secondary);
|
||||
border-color: var(--halo-border-input);
|
||||
}
|
||||
|
||||
/* ===== 选择器下拉 ===== */
|
||||
select option {
|
||||
background-color: var(--halo-bg-dropdown);
|
||||
color: var(--halo-text-primary);
|
||||
}
|
||||
|
||||
/* ===== 代码块 in forms ===== */
|
||||
.formkit-code {
|
||||
background-color: var(--halo-bg-hover);
|
||||
color: var(--halo-text-primary);
|
||||
border-color: var(--halo-border-base);
|
||||
}
|
||||
}
|
||||
/* ===== 强表单覆盖(scoped 哈希类特异性更高,需 html 前缀 + !important) ===== */
|
||||
html[data-halo-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
|
||||
html[data-halo-theme="dark"] textarea,
|
||||
html[data-halo-theme="dark"] select {
|
||||
background-color: var(--halo-bg-input) !important;
|
||||
color: var(--halo-text-primary) !important;
|
||||
border-color: var(--halo-border-input) !important;
|
||||
}
|
||||
html[data-halo-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="color"])::placeholder,
|
||||
html[data-halo-theme="dark"] textarea::placeholder,
|
||||
html[data-halo-theme="dark"] select::placeholder {
|
||||
color: var(--halo-text-tertiary) !important;
|
||||
}
|
||||
@@ -1,308 +0,0 @@
|
||||
/* ===== 根元素背景(html 自身携带属性,需独立选择器) ===== */
|
||||
html[data-halo-theme="dark"] {
|
||||
background-color: var(--halo-bg-body) !important;
|
||||
}
|
||||
/* ============================================================
|
||||
Halo Dark Mode — Halo 核心 BEM 类覆盖
|
||||
基于 Halo 2.25 真实 DOM 扫描(demo.halocms.site)得出的选择器
|
||||
============================================================ */
|
||||
|
||||
[data-halo-theme="dark"] {
|
||||
/* ===== 页面根背景(body 溢出时兜底,html 见文件顶部独立规则) ===== */
|
||||
body {
|
||||
background-color: var(--halo-bg-body) !important;
|
||||
color: var(--halo-text-primary);
|
||||
}
|
||||
|
||||
/* ===== Toast 通知 ===== */
|
||||
.toast-container .toast-body {
|
||||
background-color: var(--halo-bg-card) !important;
|
||||
color: var(--halo-text-primary) !important;
|
||||
border-color: var(--halo-border-base);
|
||||
}
|
||||
|
||||
/* ===== Markdown 正文(编辑器预览/瞬间预览) ===== */
|
||||
.markdown-body {
|
||||
background-color: transparent;
|
||||
color: var(--halo-text-primary);
|
||||
}
|
||||
.markdown-body p,
|
||||
.markdown-body li,
|
||||
.markdown-body h1,
|
||||
.markdown-body h2,
|
||||
.markdown-body h3,
|
||||
.markdown-body h4,
|
||||
.markdown-body h5,
|
||||
.markdown-body h6,
|
||||
.markdown-body td,
|
||||
.markdown-body th,
|
||||
.markdown-body blockquote,
|
||||
.markdown-body a {
|
||||
color: var(--halo-text-primary);
|
||||
}
|
||||
.markdown-body a {
|
||||
color: var(--halo-text-link);
|
||||
}
|
||||
.markdown-body code,
|
||||
.markdown-body tt {
|
||||
background-color: oklch(28% 0.02 250);
|
||||
color: oklch(85% 0.05 160);
|
||||
}
|
||||
.markdown-body pre,
|
||||
.markdown-body .highlight pre {
|
||||
background-color: oklch(20% 0.015 250);
|
||||
color: oklch(85% 0.03 160);
|
||||
}
|
||||
.markdown-body table tr,
|
||||
.markdown-body table tr:nth-child(2n) {
|
||||
background-color: var(--halo-bg-card);
|
||||
}
|
||||
.markdown-body table td,
|
||||
.markdown-body table th {
|
||||
border-color: var(--halo-border-base);
|
||||
}
|
||||
.markdown-body hr {
|
||||
background-color: var(--halo-border-base);
|
||||
}
|
||||
|
||||
/* ===== 页面顶栏 ===== */
|
||||
.page-header {
|
||||
background-color: var(--halo-bg-card);
|
||||
}
|
||||
.page-header__title-text {
|
||||
color: var(--halo-text-primary);
|
||||
}
|
||||
.page-header__actions .btn,
|
||||
.page-header__actions button {
|
||||
background-color: var(--halo-bg-card);
|
||||
color: var(--halo-text-primary);
|
||||
border-color: var(--halo-border-base);
|
||||
}
|
||||
.page-header__actions .btn:hover,
|
||||
.page-header__actions button:hover {
|
||||
background-color: var(--halo-bg-hover);
|
||||
}
|
||||
.page-header__actions .btn-content {
|
||||
color: var(--halo-text-primary);
|
||||
}
|
||||
|
||||
/* ===== 卡片容器(列表页、详情页主容器) ===== */
|
||||
.card-wrapper {
|
||||
background-color: var(--halo-bg-card);
|
||||
border-color: var(--halo-border-base);
|
||||
color: var(--halo-text-primary);
|
||||
}
|
||||
|
||||
/* ===== 实体字段列表(文章/页面/评论列表项) ===== */
|
||||
.entity-field-title {
|
||||
color: var(--halo-text-primary);
|
||||
}
|
||||
.entity-field-title-body {
|
||||
color: var(--halo-text-primary);
|
||||
}
|
||||
.entity-field-description {
|
||||
color: var(--halo-text-secondary);
|
||||
}
|
||||
|
||||
/* ===== 分页 ===== */
|
||||
.pagination {
|
||||
background-color: var(--halo-bg-card);
|
||||
color: var(--halo-text-secondary);
|
||||
}
|
||||
.pagination__btn {
|
||||
background-color: var(--halo-bg-hover);
|
||||
color: var(--halo-text-secondary);
|
||||
}
|
||||
.pagination__btn:hover {
|
||||
background-color: var(--halo-bg-active);
|
||||
color: var(--halo-text-primary);
|
||||
}
|
||||
.pagination__select {
|
||||
background-color: var(--halo-bg-input);
|
||||
color: var(--halo-text-primary);
|
||||
border-color: var(--halo-border-input);
|
||||
}
|
||||
|
||||
/* ===== 标签/徽章(BEM) ===== */
|
||||
.tag-wrapper,
|
||||
.tag-default,
|
||||
.tag-pill {
|
||||
background-color: var(--halo-bg-hover);
|
||||
color: var(--halo-text-secondary);
|
||||
}
|
||||
.tag-content,
|
||||
.tag-left-icon,
|
||||
.tag-right-icon {
|
||||
color: var(--halo-text-secondary);
|
||||
}
|
||||
|
||||
/* ===== 头像 ===== */
|
||||
.avatar-wrapper,
|
||||
.avatar-circle {
|
||||
background-color: var(--halo-bg-hover);
|
||||
}
|
||||
|
||||
/* ===== 按钮(默认态) ===== */
|
||||
.btn-default,
|
||||
.btn-secondary,
|
||||
.btn-sm,
|
||||
.btn-md,
|
||||
.btn-lg,
|
||||
.btn[class*="btn"]:not(.btn-primary):not(.btn-danger) {
|
||||
background-color: var(--halo-bg-card);
|
||||
color: var(--halo-text-primary);
|
||||
border-color: var(--halo-border-base);
|
||||
}
|
||||
.btn-default:hover,
|
||||
.btn-secondary:hover,
|
||||
.btn-sm:hover,
|
||||
.btn-md:hover,
|
||||
.btn-lg:hover {
|
||||
background-color: var(--halo-bg-hover);
|
||||
}
|
||||
.btn-content {
|
||||
color: var(--halo-text-primary);
|
||||
}
|
||||
|
||||
/* ===== 表单容器(FormKit) ===== */
|
||||
.formkit-inner {
|
||||
background-color: var(--halo-bg-input);
|
||||
}
|
||||
.formkit-inner input,
|
||||
.formkit-inner textarea,
|
||||
.formkit-inner select {
|
||||
background-color: transparent;
|
||||
color: var(--halo-text-primary);
|
||||
}
|
||||
.formkit-inner .border,
|
||||
.formkit-inner [class*="border-gray"] {
|
||||
border-color: var(--halo-border-input);
|
||||
}
|
||||
|
||||
/* ===== 下拉菜单 ===== */
|
||||
.entity-dropdown {
|
||||
background-color: var(--halo-bg-dropdown);
|
||||
color: var(--halo-text-primary);
|
||||
border-color: var(--halo-border-base);
|
||||
}
|
||||
.entity-dropdown-trigger {
|
||||
background-color: var(--halo-bg-hover);
|
||||
color: var(--halo-text-secondary);
|
||||
}
|
||||
.entity-dropdown-trigger:hover {
|
||||
background-color: var(--halo-bg-active);
|
||||
color: var(--halo-text-primary);
|
||||
}
|
||||
|
||||
/* ===== 描述项(详情页列表,如用户详情) ===== */
|
||||
.description-item-wrapper {
|
||||
background-color: var(--halo-bg-card);
|
||||
border-color: var(--halo-border-light);
|
||||
}
|
||||
.description-item__label {
|
||||
color: var(--halo-text-secondary) !important;
|
||||
}
|
||||
.description-item__content {
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
|
||||
/* ===== 已选指示器 ===== */
|
||||
.entity-selected-indicator {
|
||||
color: var(--halo-accent-primary);
|
||||
}
|
||||
|
||||
/* ===== 表格 ===== */
|
||||
.table,
|
||||
[class*="table-"] td,
|
||||
[class*="table-"] th {
|
||||
border-color: var(--halo-table-border);
|
||||
color: var(--halo-text-primary);
|
||||
}
|
||||
|
||||
/* ===== 通用文字(UnoCSS hash 类包含 Tailwind 语义) ===== */
|
||||
.hover\:text-gray-600:hover,
|
||||
.hover\:text-gray-700:hover,
|
||||
.hover\:text-gray-500:hover,
|
||||
.text-gray-600,
|
||||
.text-gray-700,
|
||||
.text-gray-500 {
|
||||
color: var(--halo-text-secondary);
|
||||
}
|
||||
.text-gray-900,
|
||||
.text-gray-800 {
|
||||
color: var(--halo-text-primary);
|
||||
}
|
||||
.text-gray-400,
|
||||
.text-gray-300 {
|
||||
color: var(--halo-text-tertiary);
|
||||
}
|
||||
|
||||
/* ===== 通用背景 ===== */
|
||||
.bg-gray-50,
|
||||
.bg-gray-100,
|
||||
.bg-white {
|
||||
background-color: var(--halo-bg-card);
|
||||
}
|
||||
.bg-gray-200 {
|
||||
background-color: var(--halo-bg-hover);
|
||||
}
|
||||
.hover\:bg-gray-50:hover,
|
||||
.hover\:bg-gray-100:hover,
|
||||
.hover\:bg-gray-200:hover {
|
||||
background-color: var(--halo-bg-hover);
|
||||
}
|
||||
|
||||
/* ===== 边框 ===== */
|
||||
.border,
|
||||
.border-gray-200,
|
||||
.border-gray-300 {
|
||||
border-color: var(--halo-border-base);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
/* ===== 侧边栏激活菜单(Halo 核心 .menu-item-title.active) ===== */
|
||||
html[data-halo-theme="dark"] .menu-item-title.active,
|
||||
html[data-halo-theme="dark"] .menu-item-title.active:hover {
|
||||
background-color: var(--halo-menu-item-active) !important;
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
html[data-halo-theme="dark"] .menu-item-title.active::after {
|
||||
background: var(--halo-accent-primary) !important;
|
||||
}
|
||||
|
||||
/* ===== 空状态标题 ===== */
|
||||
html[data-halo-theme="dark"] .empty-wrapper .empty-title {
|
||||
color: var(--halo-text-secondary) !important;
|
||||
}
|
||||
|
||||
/* ===== 提示条(Alert) ===== */
|
||||
html[data-halo-theme="dark"] .alert-wrapper {
|
||||
background-color: var(--halo-bg-card) !important;
|
||||
border-color: var(--halo-border-base) !important;
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
html[data-halo-theme="dark"] .alert-wrapper .alert-title,
|
||||
html[data-halo-theme="dark"] .alert-wrapper .alert-description,
|
||||
html[data-halo-theme="dark"] .alert-wrapper .alert-icon {
|
||||
color: var(--halo-text-secondary) !important;
|
||||
}
|
||||
html[data-halo-theme="dark"] .alert-wrapper.alert-warning {
|
||||
border-color: oklch(40% 0.12 85) !important;
|
||||
}
|
||||
html[data-halo-theme="dark"] .alert-wrapper.alert-error {
|
||||
border-color: oklch(40% 0.17 25) !important;
|
||||
}
|
||||
html[data-halo-theme="dark"] .alert-wrapper.alert-success {
|
||||
border-color: oklch(40% 0.14 150) !important;
|
||||
}
|
||||
|
||||
/* ===== 实体列表标题链接(覆盖通用链接色,hover 变链接色) ===== */
|
||||
html[data-halo-theme="dark"] .entity-field-title a,
|
||||
html[data-halo-theme="dark"] .entity-field-title-body a {
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
html[data-halo-theme="dark"] .entity-field-title a:hover,
|
||||
html[data-halo-theme="dark"] .entity-field-title-body a:hover {
|
||||
color: var(--halo-text-link) !important;
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
/* ============================================================
|
||||
Halo Dark Mode — 核心布局覆盖
|
||||
覆盖 BasicLayout.vue 的硬编码颜色
|
||||
============================================================ */
|
||||
|
||||
[data-halo-theme="dark"] {
|
||||
/* ===== 页面整体 ===== */
|
||||
.layout {
|
||||
background-color: var(--halo-bg-body);
|
||||
}
|
||||
|
||||
/* ===== 侧边栏 ===== */
|
||||
.sidebar {
|
||||
background-color: var(--halo-bg-sidebar);
|
||||
box-shadow: var(--halo-shadow-sm);
|
||||
}
|
||||
|
||||
.sidebar__search {
|
||||
background-color: var(--halo-search-bg);
|
||||
color: var(--halo-search-placeholder);
|
||||
}
|
||||
|
||||
.sidebar__search:hover {
|
||||
color: var(--halo-search-text);
|
||||
}
|
||||
|
||||
.sidebar__search-icon {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.sidebar__search-shortcut {
|
||||
color: var(--halo-text-tertiary);
|
||||
}
|
||||
|
||||
.sidebar__logo {
|
||||
filter: brightness(0.9) invert(0);
|
||||
}
|
||||
|
||||
.sidebar__profile {
|
||||
border-top-color: var(--halo-border-light);
|
||||
}
|
||||
|
||||
/* ===== 内容区 ===== */
|
||||
.main-content {
|
||||
background-color: var(--halo-bg-content);
|
||||
color: var(--halo-text-primary);
|
||||
}
|
||||
|
||||
.main-content__footer-text {
|
||||
color: var(--halo-text-tertiary);
|
||||
}
|
||||
|
||||
.main-content__footer-link {
|
||||
color: var(--halo-text-link);
|
||||
}
|
||||
|
||||
/* ===== 页面标题 ===== */
|
||||
.page-title {
|
||||
color: var(--halo-text-primary);
|
||||
}
|
||||
}
|
||||
@@ -1,383 +0,0 @@
|
||||
/* ============================================================
|
||||
Halo Dark Mode — 第三方插件页面覆盖
|
||||
针对用户服务器上已安装插件的内部 UI 残留。
|
||||
⚠️ 这些插件使用 Vue scoped 样式 ([data-v-xxx]),
|
||||
需用 !important 才能稳定覆盖。
|
||||
============================================================ */
|
||||
|
||||
[data-halo-theme="dark"] {
|
||||
/* ===== 装备管理插件 (halo-plugin-equipments) ===== */
|
||||
.equipments .group,
|
||||
.equipment-group .group,
|
||||
main .group {
|
||||
background-color: var(--halo-bg-card) !important;
|
||||
border-color: var(--halo-border-base) !important;
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
.equipment-card,
|
||||
.equipment-card__name,
|
||||
.equipment-card__desc,
|
||||
[class*="equipment"] {
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
|
||||
/* ===== 日程日历插件 (plugin-calendar) ===== */
|
||||
.week-picker {
|
||||
background-color: var(--halo-bg-card) !important;
|
||||
border-color: var(--halo-border-base) !important;
|
||||
}
|
||||
.week-picker select,
|
||||
.week-picker input,
|
||||
.week-picker button {
|
||||
background-color: var(--halo-bg-input) !important;
|
||||
color: var(--halo-text-primary) !important;
|
||||
border-color: var(--halo-border-input) !important;
|
||||
}
|
||||
.day-column__body {
|
||||
background-color: var(--halo-bg-content) !important;
|
||||
border-color: var(--halo-border-light) !important;
|
||||
}
|
||||
.day-column,
|
||||
.calendar-column,
|
||||
[class*="day-column"] {
|
||||
background-color: var(--halo-bg-card) !important;
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
[class*="calendar"] th,
|
||||
[class*="calendar"] td {
|
||||
color: var(--halo-text-primary) !important;
|
||||
border-color: var(--halo-border-base) !important;
|
||||
}
|
||||
|
||||
/* ===== 心愿便签插件 (plugin-wishboard) ===== */
|
||||
.ah-body {
|
||||
background-color: var(--halo-bg-card) !important;
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
.wb-s-card {
|
||||
background-color: var(--halo-bg-card) !important;
|
||||
color: var(--halo-text-primary) !important;
|
||||
border-color: var(--halo-border-base) !important;
|
||||
}
|
||||
.wb-s-card-title {
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
.wb-s-card-count {
|
||||
color: var(--halo-accent-primary) !important;
|
||||
}
|
||||
.wb-s-list,
|
||||
.wb-s-list-item,
|
||||
[class*="wb-s-"] {
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
|
||||
/* ===== 瞬间插件 (plugin-moments) ===== */
|
||||
.moment-editor,
|
||||
.editor-main,
|
||||
.moment-editor .card,
|
||||
.editor-main .card {
|
||||
background-color: var(--halo-bg-card) !important;
|
||||
color: var(--halo-text-primary) !important;
|
||||
border-color: var(--halo-border-base) !important;
|
||||
}
|
||||
.moments-content .card,
|
||||
.moments-content .preview,
|
||||
.moment-preview,
|
||||
.moment-card,
|
||||
[class*="moment-"] .card {
|
||||
background-color: var(--halo-bg-card) !important;
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
.moment-author-name,
|
||||
.moment-content,
|
||||
.moment-time,
|
||||
[class*="moment"] p,
|
||||
[class*="moment"] span,
|
||||
[class*="moment"] div {
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
.moment-editor input,
|
||||
.moment-editor textarea,
|
||||
.editor-main input,
|
||||
.editor-main textarea {
|
||||
background-color: var(--halo-bg-input) !important;
|
||||
color: var(--halo-text-primary) !important;
|
||||
border-color: var(--halo-border-input) !important;
|
||||
}
|
||||
|
||||
/* ===== 抽奖插件 (plugin-lottery) ===== */
|
||||
[class*="lottery"] {
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
|
||||
/* ===== 存储工具箱 (plugin-storage-toolkit) ===== */
|
||||
.toolkit-wrapper,
|
||||
.st-scope {
|
||||
background-color: var(--halo-bg-content) !important;
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
.st-pill-tabs,
|
||||
.stat-card.st-card,
|
||||
.panel-card.st-card,
|
||||
.st-card {
|
||||
background-color: var(--halo-bg-card) !important;
|
||||
color: var(--halo-text-primary) !important;
|
||||
border-color: var(--halo-border-base) !important;
|
||||
}
|
||||
.st-card h3,
|
||||
.st-card h4,
|
||||
.st-card p,
|
||||
.st-card span,
|
||||
.st-card li,
|
||||
[class*="st-"] .title,
|
||||
[class*="st-"] .name {
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
[class*="st-"] {
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
|
||||
/* ===== 应用市场已安装 (Halo 内置 app-store) ===== */
|
||||
.tabbar-wrapper,
|
||||
.tabbar-outline,
|
||||
[class*="tabbar"] {
|
||||
background-color: var(--halo-bg-hover) !important;
|
||||
color: var(--halo-text-primary) !important;
|
||||
border-color: var(--halo-border-base) !important;
|
||||
}
|
||||
.tabbar-item,
|
||||
[class*="tabbar"] a,
|
||||
[class*="tabbar"] span {
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
.tabbar-item:hover,
|
||||
[class*="tabbar"] a:hover {
|
||||
background-color: var(--halo-bg-active) !important;
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
/* 已安装应用页的筛选和卡片 */
|
||||
.app-card,
|
||||
.app-card-header,
|
||||
.app-card-body,
|
||||
[class*="app-card"] {
|
||||
background-color: var(--halo-bg-card) !important;
|
||||
color: var(--halo-text-primary) !important;
|
||||
border-color: var(--halo-border-base) !important;
|
||||
}
|
||||
.app-card .title,
|
||||
.app-card .name,
|
||||
.app-card .desc,
|
||||
[class*="app-card"] h3,
|
||||
[class*="app-card"] p {
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
|
||||
/* ===== 文档/示例页面 (docs__box) ===== */
|
||||
.docs__box {
|
||||
background-color: var(--halo-bg-card) !important;
|
||||
color: var(--halo-text-primary) !important;
|
||||
border-color: var(--halo-border-base) !important;
|
||||
}
|
||||
.docs__box h3,
|
||||
.docs__box h4,
|
||||
.docs__box p,
|
||||
.docs__box li,
|
||||
.docs__box a {
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
.docs__box a:hover {
|
||||
color: var(--halo-text-link) !important;
|
||||
}
|
||||
|
||||
/* ===== 通用:任何插件页面的亮色卡片兜底 ===== */
|
||||
main .bg-gray-50,
|
||||
main .bg-gray-100,
|
||||
main .bg-gray-200 {
|
||||
background-color: var(--halo-bg-hover) !important;
|
||||
}
|
||||
main .bg-white {
|
||||
background-color: var(--halo-bg-card) !important;
|
||||
}
|
||||
|
||||
/* ===== 应用卡片内筛选 tab(UnoCSS hash 类,用上下文定位) ===== */
|
||||
.card-wrapper .card-header [class*="i-"],
|
||||
.card-header [class*="i-"],
|
||||
.card-wrapper .card-body [class*="i-"],
|
||||
.card-body [class*="i-"],
|
||||
[class*="app-card"] [class*="i-"] {
|
||||
background-color: var(--halo-bg-hover) !important;
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
.card-wrapper .card-header [class*="i-"]:hover,
|
||||
.card-header [class*="i-"]:hover,
|
||||
.card-wrapper .card-body [class*="i-"]:hover,
|
||||
.card-body [class*="i-"]:hover {
|
||||
background-color: var(--halo-bg-active) !important;
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
|
||||
/* ===== 存储工具箱表格表头 (col-*) ===== */
|
||||
.col-name,
|
||||
.col-count,
|
||||
.col-size,
|
||||
.col-percent,
|
||||
[class*="col-"] {
|
||||
background-color: var(--halo-table-header-bg) !important;
|
||||
color: var(--halo-text-secondary) !important;
|
||||
}
|
||||
|
||||
/* ===== 侧边栏用户资料(Halo Pro 特有) ===== */
|
||||
.sidebar__profile .user-profile {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
.user-profile__name {
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
.user-profile__roles .tag-default,
|
||||
.user-profile__roles .tag-wrapper {
|
||||
background-color: var(--halo-bg-hover) !important;
|
||||
color: var(--halo-text-secondary) !important;
|
||||
}
|
||||
.user-profile__action-button {
|
||||
color: var(--halo-text-secondary) !important;
|
||||
background-color: transparent !important;
|
||||
}
|
||||
.user-profile__action-button:hover {
|
||||
background-color: var(--halo-bg-hover) !important;
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
}
|
||||
/* ===== AstraHub / 心愿便签(共用 ah-* UI) ===== */
|
||||
html[data-halo-theme="dark"] .ah-card,
|
||||
html[data-halo-theme="dark"] .ah-topbar,
|
||||
html[data-halo-theme="dark"] .ah-topbar-search,
|
||||
html[data-halo-theme="dark"] .ah-float-nav {
|
||||
background-color: var(--halo-bg-card) !important;
|
||||
border-color: var(--halo-border-base) !important;
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
html[data-halo-theme="dark"] .ah-topbar-search {
|
||||
background-color: var(--halo-bg-input) !important;
|
||||
}
|
||||
html[data-halo-theme="dark"] .ah-topbar-brand,
|
||||
html[data-halo-theme="dark"] .planet-hero-title {
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
html[data-halo-theme="dark"] .ah-topbar-search input {
|
||||
background-color: transparent !important;
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
html[data-halo-theme="dark"] .planet-links-more {
|
||||
background-color: var(--halo-bg-card) !important;
|
||||
color: var(--halo-text-secondary) !important;
|
||||
}
|
||||
|
||||
/* ===== RSS 订阅(links/rss) ===== */
|
||||
html[data-halo-theme="dark"] .subscription-panel,
|
||||
html[data-halo-theme="dark"] .feed-main,
|
||||
html[data-halo-theme="dark"] .feed-toolbar,
|
||||
html[data-halo-theme="dark"] .feed-stream,
|
||||
html[data-halo-theme="dark"] .feed-stream__footer {
|
||||
background-color: var(--halo-bg-card) !important;
|
||||
border-color: var(--halo-border-base) !important;
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
html[data-halo-theme="dark"] .feed-status-tabs {
|
||||
background-color: var(--halo-bg-hover) !important;
|
||||
color: var(--halo-text-secondary) !important;
|
||||
}
|
||||
html[data-halo-theme="dark"] .feed-brief__title,
|
||||
html[data-halo-theme="dark"] .feed-stream p,
|
||||
html[data-halo-theme="dark"] .feed-stream a,
|
||||
html[data-halo-theme="dark"] .subscription-panel a,
|
||||
html[data-halo-theme="dark"] .subscription-panel span {
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
|
||||
/* ===== 私密文章插件 ===== */
|
||||
html[data-halo-theme="dark"] .focus-card,
|
||||
html[data-halo-theme="dark"] .overview-card,
|
||||
html[data-halo-theme="dark"] .list-card,
|
||||
html[data-halo-theme="dark"] .empty-state {
|
||||
background-color: var(--halo-bg-card) !important;
|
||||
border-color: var(--halo-border-base) !important;
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
html[data-halo-theme="dark"] .overview-card h2,
|
||||
html[data-halo-theme="dark"] .page-shell h2,
|
||||
html[data-halo-theme="dark"] .overview-stats dd,
|
||||
html[data-halo-theme="dark"] .overview-stats dt {
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
|
||||
/* ===== AI 评论自动处理插件 ===== */
|
||||
html[data-halo-theme="dark"] .settings-container,
|
||||
html[data-halo-theme="dark"] .setting-panel,
|
||||
html[data-halo-theme="dark"] .tabs-wrap,
|
||||
html[data-halo-theme="dark"] .sidebar-card,
|
||||
html[data-halo-theme="dark"] .list-empty,
|
||||
html[data-halo-theme="dark"] .reply-card {
|
||||
background-color: var(--halo-bg-card) !important;
|
||||
border-color: var(--halo-border-base) !important;
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
html[data-halo-theme="dark"] .form-row,
|
||||
html[data-halo-theme="dark"] .list-col,
|
||||
html[data-halo-theme="dark"] .panel-header,
|
||||
html[data-halo-theme="dark"] .card-footer {
|
||||
background-color: var(--halo-bg-hover) !important;
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
html[data-halo-theme="dark"] .section-header__text h3,
|
||||
html[data-halo-theme="dark"] .sidebar-header h4,
|
||||
html[data-halo-theme="dark"] .panel-header h3,
|
||||
html[data-halo-theme="dark"] .reply-card h3 {
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
html[data-halo-theme="dark"] .wake-word-tag {
|
||||
background-color: var(--halo-bg-hover) !important;
|
||||
color: var(--halo-text-secondary) !important;
|
||||
}
|
||||
|
||||
/* ===== 数据工坊 / 代码注入器等工具页语义容器 ===== */
|
||||
html[data-halo-theme="dark"] .data-studio-card-body,
|
||||
html[data-halo-theme="dark"] .injector-view-card-body,
|
||||
html[data-halo-theme="dark"] .injector-editor-container {
|
||||
background-color: var(--halo-bg-card) !important;
|
||||
border-color: var(--halo-border-base) !important;
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
|
||||
/* ===== 示例插件页 ===== */
|
||||
html[data-halo-theme="dark"] main section#plugin-starter {
|
||||
background-color: var(--halo-bg-body) !important;
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
|
||||
/* ===== 友链卡片徽章 ===== */
|
||||
html[data-halo-theme="dark"] .link-badge {
|
||||
background-color: var(--halo-bg-hover) !important;
|
||||
color: var(--halo-text-primary) !important;
|
||||
border-color: var(--halo-border-base) !important;
|
||||
}
|
||||
/* ===== 日程日历插件(time-column 布局) ===== */
|
||||
html[data-halo-theme="dark"] .time-column__header,
|
||||
html[data-halo-theme="dark"] .time-column__body,
|
||||
html[data-halo-theme="dark"] [class*="time-column"] {
|
||||
background-color: var(--halo-bg-card) !important;
|
||||
color: var(--halo-text-primary) !important;
|
||||
border-color: var(--halo-border-base) !important;
|
||||
}
|
||||
html[data-halo-theme="dark"] .entry-card-header__title {
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
|
||||
/* ===== 存储工具箱补充类 ===== */
|
||||
html[data-halo-theme="dark"] .stat-value,
|
||||
html[data-halo-theme="dark"] .stat-card .card-title,
|
||||
html[data-halo-theme="dark"] .panel-card .card-title {
|
||||
color: var(--halo-text-primary) !important;
|
||||
}
|
||||
html[data-halo-theme="dark"] .bar-track {
|
||||
background-color: var(--halo-bg-disabled) !important;
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
/* ============================================================
|
||||
Halo Dark Mode — 滚动条覆盖
|
||||
OverlayScrollbars + 原生滚动条
|
||||
============================================================ */
|
||||
|
||||
[data-halo-theme="dark"] {
|
||||
/* ===== OverlayScrollbars ===== */
|
||||
.os-scrollbar .os-scrollbar-handle {
|
||||
background-color: var(--halo-scrollbar-thumb);
|
||||
}
|
||||
|
||||
.os-scrollbar .os-scrollbar-track {
|
||||
background-color: var(--halo-scrollbar-track);
|
||||
}
|
||||
|
||||
.os-scrollbar .os-scrollbar-handle:hover {
|
||||
background-color: oklch(45% 0.03 250);
|
||||
}
|
||||
|
||||
/* ===== 原生滚动条(Firefox) ===== */
|
||||
* {
|
||||
scrollbar-color: var(--halo-scrollbar-thumb) var(--halo-scrollbar-track);
|
||||
scrollbar-width: thin;
|
||||
}
|
||||
|
||||
/* ===== 原生滚动条(Webkit:Chrome/Edge/Safari) ===== */
|
||||
::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
background: var(--halo-scrollbar-track);
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: var(--halo-scrollbar-thumb);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background: oklch(45% 0.03 250);
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-corner {
|
||||
background: var(--halo-scrollbar-track);
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
/* ============================================================
|
||||
Halo Dark Mode — UnoCSS 哈希类兜底
|
||||
Halo 2.25 中 UnoCSS 同时生成 uno-* / i-* 哈希类,
|
||||
这些类随构建变化,只能按结构定位兜底,不写死哈希值。
|
||||
注意:本文件规则刻意不加 !important,便于后续语义规则覆盖。
|
||||
============================================================ */
|
||||
|
||||
/* 文字兜底:只修正文本元素,豁免表单控件 */
|
||||
html[data-halo-theme="dark"] main [class*="uno-"]:not(input):not(select):not(textarea) {
|
||||
color: var(--halo-text-primary);
|
||||
}
|
||||
|
||||
/* 块级容器背景兜底:豁免交互元素与表单控件 */
|
||||
html[data-halo-theme="dark"] main [class*="uno-"]:not(button):not(a):not(input):not(select):not(textarea):not(label) {
|
||||
background-color: var(--halo-bg-card);
|
||||
border-color: var(--halo-border-base);
|
||||
}
|
||||
|
||||
/* 页面级容器使用内容区背景 */
|
||||
html[data-halo-theme="dark"] main > [class*="uno-"] {
|
||||
background-color: var(--halo-bg-content);
|
||||
}
|
||||
|
||||
/* 卡片头/卡片体内的 uno-* 区块使用 hover 级背景 */
|
||||
html[data-halo-theme="dark"] .card-header [class*="uno-"],
|
||||
html[data-halo-theme="dark"] .card-body [class*="uno-"] {
|
||||
background-color: var(--halo-bg-hover);
|
||||
border-color: var(--halo-border-light);
|
||||
}
|
||||
|
||||
/* 旧版 i-* 哈希:只做文字兜底,避免给图标类设置背景 */
|
||||
html[data-halo-theme="dark"] main [class*="i-"]:not(input):not(select):not(textarea) {
|
||||
color: var(--halo-text-primary);
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
/* ============================================================
|
||||
Halo Dark Mode — Tailwind 工具类覆盖
|
||||
覆盖 Tailwind 的颜色类和常见 UI 原子类
|
||||
============================================================ */
|
||||
|
||||
[data-halo-theme="dark"] {
|
||||
/* ===== 背景色 ===== */
|
||||
.bg-white {
|
||||
background-color: var(--halo-bg-card);
|
||||
}
|
||||
|
||||
.bg-gray-50,
|
||||
.bg-gray-100 {
|
||||
background-color: var(--halo-bg-content);
|
||||
}
|
||||
|
||||
.bg-gray-200 {
|
||||
background-color: var(--halo-bg-hover);
|
||||
}
|
||||
|
||||
/* ===== 文字色 ===== */
|
||||
.text-gray-900,
|
||||
.text-gray-800 {
|
||||
color: var(--halo-text-primary);
|
||||
}
|
||||
|
||||
.text-gray-700,
|
||||
.text-gray-600,
|
||||
.text-gray-500 {
|
||||
color: var(--halo-text-secondary);
|
||||
}
|
||||
|
||||
.text-gray-400,
|
||||
.text-gray-300 {
|
||||
color: var(--halo-text-tertiary);
|
||||
}
|
||||
|
||||
/* ===== 边框 ===== */
|
||||
.border,
|
||||
.border-gray-200,
|
||||
.border-gray-300 {
|
||||
border-color: var(--halo-border-base);
|
||||
}
|
||||
|
||||
.divide-y > :not([hidden]) ~ :not([hidden]),
|
||||
.divide-x > :not([hidden]) ~ :not([hidden]) {
|
||||
border-color: var(--halo-border-light);
|
||||
}
|
||||
|
||||
/* ===== 阴影 ===== */
|
||||
.shadow {
|
||||
box-shadow: var(--halo-shadow-base);
|
||||
}
|
||||
|
||||
.shadow-sm {
|
||||
box-shadow: var(--halo-shadow-sm);
|
||||
}
|
||||
|
||||
.shadow-lg,
|
||||
.shadow-xl {
|
||||
box-shadow: var(--halo-shadow-lg);
|
||||
}
|
||||
|
||||
/* ===== 链接 ===== */
|
||||
html[data-halo-theme="dark"] a:not([class*="text-"]) {
|
||||
color: var(--halo-text-link);
|
||||
}
|
||||
|
||||
/* ===== 通用悬停 ===== */
|
||||
.hover\:bg-gray-50:hover,
|
||||
.hover\:bg-gray-100:hover {
|
||||
background-color: var(--halo-bg-hover);
|
||||
}
|
||||
}
|
||||
@@ -58,59 +58,3 @@
|
||||
--halo-tag-bg: oklch(90% 0.04 160);
|
||||
--halo-tag-text: oklch(40% 0.1 160);
|
||||
}
|
||||
|
||||
/* ===== 深色模式 ===== */
|
||||
[data-halo-theme="dark"] {
|
||||
--halo-bg-body: oklch(14% 0.01 250);
|
||||
--halo-bg-sidebar: oklch(16% 0.015 250);
|
||||
--halo-bg-content: oklch(14% 0.01 250);
|
||||
--halo-bg-card: oklch(18% 0.015 250);
|
||||
--halo-bg-input: oklch(20% 0.015 250);
|
||||
--halo-bg-hover: oklch(24% 0.02 250);
|
||||
--halo-bg-active: oklch(28% 0.03 160);
|
||||
--halo-bg-disabled: oklch(16% 0.005 250);
|
||||
--halo-bg-tooltip: oklch(25% 0.01 250);
|
||||
--halo-bg-modal: oklch(0% 0 0 / 60%);
|
||||
--halo-bg-dropdown: oklch(20% 0.015 250);
|
||||
|
||||
--halo-text-primary: oklch(92% 0.005 250);
|
||||
--halo-text-secondary: oklch(70% 0.01 250);
|
||||
--halo-text-tertiary: oklch(50% 0.01 250);
|
||||
--halo-text-link: oklch(72% 0.14 160);
|
||||
--halo-text-inverse: oklch(14% 0.01 250);
|
||||
|
||||
--halo-border-base: oklch(28% 0.015 250);
|
||||
--halo-border-light: oklch(22% 0.01 250);
|
||||
--halo-border-input: oklch(30% 0.015 250);
|
||||
--halo-border-focus: oklch(65% 0.14 160);
|
||||
|
||||
--halo-accent-primary: oklch(60% 0.13 160);
|
||||
--halo-accent-primary-hover: oklch(66% 0.12 160);
|
||||
--halo-accent-primary-text: oklch(14% 0.02 160);
|
||||
--halo-accent-danger: oklch(50% 0.18 25);
|
||||
--halo-accent-danger-hover: oklch(56% 0.17 25);
|
||||
--halo-accent-success: oklch(58% 0.16 150);
|
||||
--halo-accent-warning: oklch(65% 0.16 85);
|
||||
|
||||
--halo-shadow-sm: 0 1px 2px oklch(0% 0 0 / 30%);
|
||||
--halo-shadow-base: 0 2px 8px oklch(0% 0 0 / 40%);
|
||||
--halo-shadow-lg: 0 4px 16px oklch(0% 0 0 / 50%);
|
||||
|
||||
--halo-scrollbar-thumb: oklch(35% 0.02 250);
|
||||
--halo-scrollbar-track: oklch(18% 0.01 250);
|
||||
|
||||
--halo-search-bg: oklch(20% 0.015 250);
|
||||
--halo-search-text: oklch(70% 0.01 250);
|
||||
--halo-search-placeholder: oklch(50% 0.01 250);
|
||||
|
||||
--halo-menu-item-hover: oklch(22% 0.02 160);
|
||||
--halo-menu-item-active: oklch(28% 0.04 160);
|
||||
--halo-menu-group-title: oklch(55% 0.01 250);
|
||||
|
||||
--halo-table-header-bg: oklch(18% 0.01 250);
|
||||
--halo-table-row-hover: oklch(22% 0.015 250);
|
||||
--halo-table-border: oklch(26% 0.015 250);
|
||||
|
||||
--halo-tag-bg: oklch(22% 0.03 160);
|
||||
--halo-tag-text: oklch(80% 0.08 160);
|
||||
}
|
||||
|
||||
Vendored
-23
@@ -1,23 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2026 Dark Reader Ltd.
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
Vendored
-9366
File diff suppressed because it is too large
Load Diff
Vendored
-9048
File diff suppressed because it is too large
Load Diff
Vendored
-173
@@ -1,173 +0,0 @@
|
||||
declare namespace DarkReader {
|
||||
/**
|
||||
* Enables dark mode for current web page.
|
||||
* @param theme Theme options.
|
||||
* @param fixes Fixes for the generated theme.
|
||||
*/
|
||||
function enable(theme: Partial<Theme>, fixes?: DynamicThemeFix): void;
|
||||
|
||||
/**
|
||||
* Disables dark mode for current web page.
|
||||
*/
|
||||
function disable(): void;
|
||||
|
||||
/**
|
||||
* Enables dark mode when system color scheme is dark.
|
||||
* @param theme Theme options.
|
||||
* @param fixes Fixes for the generated theme.
|
||||
*/
|
||||
function auto(theme: Partial<Theme> | false, fixes?: DynamicThemeFix): void;
|
||||
|
||||
/**
|
||||
* Stops watching for system color scheme.
|
||||
* @param isEnabled Boolean `false` value.
|
||||
*/
|
||||
function auto(isEnabled: false): void;
|
||||
/**
|
||||
* Returns if darkreader is enabled.
|
||||
*/
|
||||
function isEnabled(): boolean;
|
||||
|
||||
/**
|
||||
* Sets a function for making CORS requests.
|
||||
* @param fetch A fetch function.
|
||||
*/
|
||||
function setFetchMethod(fetch: (url: string) => Promise<Response>): void;
|
||||
|
||||
/**
|
||||
* Returns the generated CSS by Dark Reader as a string.
|
||||
*/
|
||||
function exportGeneratedCSS(): Promise<string>;
|
||||
|
||||
/**
|
||||
* Theme options.
|
||||
*/
|
||||
interface Theme {
|
||||
/**
|
||||
* 1 - dark mode, 0 - dimmed mode.
|
||||
* Default 1.
|
||||
*/
|
||||
mode: 0 | 1;
|
||||
/**
|
||||
* Brightness (0 - 100+).
|
||||
* Default 100.
|
||||
*/
|
||||
brightness: number;
|
||||
/**
|
||||
* Contrast (0 - 100+).
|
||||
* Default 100.
|
||||
*/
|
||||
contrast: number;
|
||||
/**
|
||||
* Grayscale (0 - 100).
|
||||
* Default 0.
|
||||
*/
|
||||
grayscale: number;
|
||||
/**
|
||||
* Sepia (0 - 100).
|
||||
* Default 0.
|
||||
*/
|
||||
sepia: number;
|
||||
/**
|
||||
* Specifies if custom font should be used.
|
||||
* Default false.
|
||||
*/
|
||||
useFont: boolean;
|
||||
/**
|
||||
* Font family to use.
|
||||
*/
|
||||
fontFamily: string;
|
||||
/**
|
||||
* Makes text look bolder (0 - 1px).
|
||||
* Default 0.
|
||||
*/
|
||||
textStroke: number;
|
||||
/**
|
||||
* Background color to use for dark mode.
|
||||
* Default #181a1b
|
||||
*/
|
||||
darkSchemeBackgroundColor: string;
|
||||
/**
|
||||
* Text color to use for dark mode.
|
||||
* Default #e8e6e3
|
||||
*/
|
||||
darkSchemeTextColor: string;
|
||||
/**
|
||||
* Background color to use for light mode.
|
||||
* Default #dcdad7
|
||||
*/
|
||||
lightSchemeBackgroundColor: string;
|
||||
/**
|
||||
* Text color to use for light mode.
|
||||
* Default #181a1b
|
||||
*/
|
||||
lightSchemeTextColor: string;
|
||||
/**
|
||||
* Scrollbar color
|
||||
* Default auto
|
||||
*/
|
||||
scrollbarColor: string;
|
||||
/**
|
||||
* Selection color
|
||||
* Default auto
|
||||
*/
|
||||
selectionColor: string;
|
||||
/**
|
||||
* Specifies if it has to style system controls
|
||||
* Default true
|
||||
*/
|
||||
styleSystemControls: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Contains fixes for the generated theme.
|
||||
*/
|
||||
interface DynamicThemeFix {
|
||||
/**
|
||||
* List of CSS selectors that should be inverted.
|
||||
* Usually icons that are contained in sprites.
|
||||
*/
|
||||
invert: string[];
|
||||
/**
|
||||
* Additional CSS.
|
||||
* ${color} template should be used to apply theme options to a color.
|
||||
* Example:
|
||||
* ```
|
||||
* body {
|
||||
* background-color: ${white} !important;
|
||||
* background-image: none !important;
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
css: string;
|
||||
/**
|
||||
* List of CSS selectors where it's inline style should not be analyzed
|
||||
* Mostly used for color pickers
|
||||
*/
|
||||
ignoreInlineStyle: string[];
|
||||
/**
|
||||
* List of CSS selectors where it's image should not be analyzed
|
||||
* Mostly used for wrongly inverted background-images
|
||||
*/
|
||||
ignoreImageAnalysis: string[];
|
||||
|
||||
/**
|
||||
* A toggle to disable the proxying of `document.styleSheets`.
|
||||
* This is a API-Exclusive option, as it can break legitimate websites,
|
||||
* who are using the Dark Reader API.
|
||||
*/
|
||||
disableStyleSheetsProxy: boolean;
|
||||
/**
|
||||
* List of stylesheet URL patterns to ignore.
|
||||
* Stylesheets matching these patterns will not be processed by Dark Reader.
|
||||
* - Simple string: matches if URL contains the string (e.g., "crisp")
|
||||
* - Prefix with ^: matches if URL starts with pattern (e.g., "^https://client.crisp")
|
||||
* - Suffix with $: matches if URL ends with pattern (e.g., ".css$")
|
||||
*/
|
||||
ignoreCSSUrl: string[];
|
||||
}
|
||||
}
|
||||
|
||||
declare module 'darkreader' {
|
||||
export = DarkReader;
|
||||
}
|
||||
Vendored
-9
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"name": "darkreader",
|
||||
"version": "4.9.129",
|
||||
"description": "Dark mode for every website",
|
||||
"main": "darkreader.js",
|
||||
"module": "darkreader.mjs",
|
||||
"types": "index.d.ts",
|
||||
"license": "MIT"
|
||||
}
|
||||
Reference in New Issue
Block a user