| 第28行: | 第28行: | ||
--theme-sticky-nav-background-color: #ba8433; | --theme-sticky-nav-background-color: #ba8433; | ||
--theme-page-background-color--secondary: #4d4f31; | --theme-page-background-color--secondary: #4d4f31; | ||
--theme-body-background-color: #e0daa7; | --theme-body-background-color: #e0daa7; /* 仅变量,不桥接到 body(body 需保持 transparent 透出背景图) */ | ||
--theme-page-background-color: #e0daa7; | --theme-page-background-color: #e0daa7; | ||
--theme-background-image-opacity: 79%; | --theme-background-image-opacity: 79%; /* 仅背景图明暗,不影响卡片 */ | ||
--theme-accent-color: #89702a; | --theme-accent-color: #89702a; | ||
--theme-link-color: #922c2c; | --theme-link-color: #922c2c; | ||
| 第40行: | 第40行: | ||
--theme-sticky-nav-background-color: #222222; | --theme-sticky-nav-background-color: #222222; | ||
--theme-page-background-color--secondary: #37393b; | --theme-page-background-color--secondary: #37393b; | ||
--theme-body-background-color: #1d2026; | --theme-body-background-color: #1d2026; /* 仅变量,不桥接到 body(body 需保持 transparent 透出背景图) */ | ||
--theme-page-background-color: #141618; | --theme-page-background-color: #141618; | ||
--theme-background-image-opacity: 40%; | --theme-background-image-opacity: 40%; /* 仅背景图明暗,不影响卡片 */ | ||
--theme-accent-color: #61636b; | --theme-accent-color: #61636b; | ||
--theme-link-color: #e8621a; | --theme-link-color: #e8621a; | ||
| 第50行: | 第50行: | ||
/* ===== 变量桥接层(!important 压过 less 硬编码,勿改动)===== */ | /* ===== 变量桥接层(!important 压过 less 硬编码,勿改动)===== */ | ||
/* 内容卡片:纯色不透明(Fandom 官方语义),不透明度由 Cosmos 原生处理 */ | |||
#mw-content, #mw-content-text, .cosmos-article-container, #catlinks { | #mw-content, #mw-content-text, .cosmos-article-container, #catlinks { | ||
background-color: | background-color: var(--theme-page-background-color) !important; | ||
} | } | ||
#cosmos-footer { | #cosmos-footer { | ||
| 第61行: | 第62行: | ||
.cosmos-header { | .cosmos-header { | ||
background-color: var(--theme-page-background-color--secondary) !important; | background-color: var(--theme-page-background-color--secondary) !important; | ||
} | } | ||
.cosmos-button-primary { | .cosmos-button-primary { | ||
| 第77行: | 第75行: | ||
color: var(--theme-link-color) !important; | color: var(--theme-link-color) !important; | ||
} | } | ||
/* body 不在桥接层:需保持 transparent 让背景图经 body::after 透出 */ | |||
body::after { | body::after { | ||
background-image: var(--theme-body-background-image, none) !important; | background-image: var(--theme-body-background-image, none) !important; | ||
2026年8月8日 (六) 19:16的版本
/* ============================================================
夜间模式关闭反转滤镜(配套 LocalSettings.darkmode.php)
DarkMode 扩展对 <html> 和内部 img/video/svg/iframe 分别加滤镜,
必须全部关掉,否则深色配色被反回浅色、图片反色。
============================================================ */
html.client-darkmode,
html.skin-theme-clientpref-night {
filter: none !important;
-webkit-filter: none !important;
}
html.client-darkmode img,
html.client-darkmode video,
html.client-darkmode svg,
html.client-darkmode iframe,
html.skin-theme-clientpref-night img,
html.skin-theme-clientpref-night video,
html.skin-theme-clientpref-night svg,
html.skin-theme-clientpref-night iframe {
filter: none !important;
-webkit-filter: none !important;
}
body{background-color:transparent!important}
/* ===== Cosmos 主题变量(日间默认值,改这里即可自定义皮肤)===== */
:root, html:not(.client-darkmode){
--theme-sticky-nav-background-color: #ba8433;
--theme-page-background-color--secondary: #4d4f31;
--theme-body-background-color: #e0daa7; /* 仅变量,不桥接到 body(body 需保持 transparent 透出背景图) */
--theme-page-background-color: #e0daa7;
--theme-background-image-opacity: 79%; /* 仅背景图明暗,不影响卡片 */
--theme-accent-color: #89702a;
--theme-link-color: #922c2c;
--cosmos-toolbar-gradient: linear-gradient(to right, #0b0805 0%, #2a2014 50%, #0b0805 100%);
--cosmos-footer-bg: #210738;
}
/* ===== Cosmos 主题变量(夜间默认值,改这里即可自定义皮肤)===== */
html.client-darkmode, html.skin-theme-clientpref-night{
--theme-sticky-nav-background-color: #222222;
--theme-page-background-color--secondary: #37393b;
--theme-body-background-color: #1d2026; /* 仅变量,不桥接到 body(body 需保持 transparent 透出背景图) */
--theme-page-background-color: #141618;
--theme-background-image-opacity: 40%; /* 仅背景图明暗,不影响卡片 */
--theme-accent-color: #61636b;
--theme-link-color: #e8621a;
--cosmos-toolbar-gradient: linear-gradient(to right, #070708 0%, #1b1c1e 50%, #070708 100%);
--cosmos-footer-bg: #12091c;
}
/* ===== 变量桥接层(!important 压过 less 硬编码,勿改动)===== */
/* 内容卡片:纯色不透明(Fandom 官方语义),不透明度由 Cosmos 原生处理 */
#mw-content, #mw-content-text, .cosmos-article-container, #catlinks {
background-color: var(--theme-page-background-color) !important;
}
#cosmos-footer {
background-color: color-mix(in srgb, var(--cosmos-footer-bg) 90%, transparent) !important;
}
#cosmos-banner {
background-color: var(--theme-sticky-nav-background-color) !important;
}
.cosmos-header {
background-color: var(--theme-page-background-color--secondary) !important;
}
.cosmos-button-primary {
background-color: var(--theme-accent-color) !important;
}
#cosmos-toolbar {
background-image: var(--cosmos-toolbar-gradient) !important;
}
#mw-content a:not(.new), #mw-content-text a:not(.new), .cosmos-article-container a:not(.new) {
color: var(--theme-link-color) !important;
}
#cosmos-toolbar a, #cosmos-footer a {
color: var(--theme-link-color) !important;
}
/* body 不在桥接层:需保持 transparent 让背景图经 body::after 透出 */
body::after {
background-image: var(--theme-body-background-image, none) !important;
background-size: var(--cosmos-bg-size, cover) !important;
background-repeat: var(--cosmos-bg-repeat, no-repeat) !important;
}
/* 背景图变量([B2] 重传同名文件后哈希路径会变,需到 Special:FilePath/<文件名> 查新 URL 并更新) */
:root, html:not(.client-darkmode) {
--theme-body-background-image: url(/images/b/b0/Site-background-light.png);
--cosmos-bg-size: cover;
--cosmos-bg-repeat: no-repeat;
}
html.client-darkmode, html.skin-theme-clientpref-night {
--theme-body-background-image: url(/images/9/9a/Site-background-dark.png);
--cosmos-bg-size: cover;
--cosmos-bg-repeat: no-repeat;
}