MediaWiki:Common.css:修订间差异
MediaWiki界面页面
更多操作
无编辑摘要 |
加入图鉴筛选面板样式(橘/白) |
||
| 第208行: | 第208行: | ||
max-width: 300px; | max-width: 300px; | ||
line-height: 1.5; | line-height: 1.5; | ||
} | |||
/* ========================================================================== | |||
6. 图鉴筛选面板(橘 / 白主色调) | |||
由 MediaWiki:Common.js 中的 __mwFilterLoaded 生成 DOM | |||
========================================================================== */ | |||
.AnnTools-MWFilter { | |||
margin: 1em 0; | |||
} | |||
.mwfilter { | |||
--mf-orange: #f5a200; | |||
--mf-orange-deep: #dd8b00; | |||
--mf-orange-light: #ffb733; | |||
--mf-line: #f2dcb8; | |||
--mf-cream: #fffaf2; | |||
--mf-text: #3a2a12; | |||
--mf-muted: #a89070; | |||
max-width: 100%; | |||
overflow: hidden; | |||
font-size: 13.5px; | |||
line-height: 1.5; | |||
color: var(--mf-text); | |||
background: #fff; | |||
border: 1px solid var(--mf-line); | |||
border-radius: 12px; | |||
box-shadow: 0 2px 12px rgba(196, 128, 20, 0.12); | |||
} | |||
/* 顶部标题栏 */ | |||
.mwfilter-head { | |||
display: flex; | |||
align-items: center; | |||
justify-content: space-between; | |||
gap: 12px; | |||
padding: 9px 16px; | |||
color: #fff; | |||
font-weight: 600; | |||
letter-spacing: 0.02em; | |||
background: linear-gradient(135deg, var(--mf-orange-light) 0%, var(--mf-orange) 55%, var(--mf-orange-deep) 100%); | |||
} | |||
.mwfilter-title { | |||
display: inline-flex; | |||
align-items: center; | |||
gap: 8px; | |||
min-width: 0; | |||
} | |||
.mwfilter-title::before { | |||
content: ""; | |||
flex: 0 0 auto; | |||
width: 8px; | |||
height: 8px; | |||
border-radius: 50%; | |||
background: #fff; | |||
box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35); | |||
} | |||
.mwfilter-count { | |||
flex: 0 0 auto; | |||
padding: 1px 10px; | |||
font-size: 12px; | |||
font-weight: 400; | |||
border-radius: 999px; | |||
background: rgba(255, 255, 255, 0.22); | |||
white-space: nowrap; | |||
} | |||
/* 筛选行 */ | |||
.mwfilter-body { | |||
display: flex; | |||
flex-direction: column; | |||
gap: 6px; | |||
padding: 11px 16px 7px; | |||
} | |||
.mwfilter-row { | |||
display: grid; | |||
grid-template-columns: 58px 1fr; | |||
align-items: start; | |||
gap: 10px; | |||
} | |||
.mwfilter-label { | |||
padding-top: 4px; | |||
font-weight: 600; | |||
font-size: 12.5px; | |||
color: var(--mf-orange-deep); | |||
white-space: nowrap; | |||
} | |||
.mwfilter-chips { | |||
display: flex; | |||
flex-wrap: wrap; | |||
gap: 6px; | |||
min-width: 0; | |||
} | |||
/* 筛选按钮 */ | |||
.mwfilter-chip { | |||
-webkit-appearance: none; | |||
appearance: none; | |||
display: inline-flex; | |||
align-items: center; | |||
justify-content: center; | |||
height: 26px; | |||
padding: 0 12px; | |||
font-size: 13px; | |||
line-height: 1; | |||
color: #8a5a00; | |||
background: #fff; | |||
border: 1px solid #efd0a1; | |||
border-radius: 999px; | |||
cursor: pointer; | |||
white-space: nowrap; | |||
transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, | |||
box-shadow 0.15s ease, transform 0.1s ease; | |||
} | |||
.mwfilter-chip:hover { | |||
color: #c07000; | |||
background: #fff6e8; | |||
border-color: var(--mf-orange); | |||
} | |||
.mwfilter-chip:active { | |||
transform: translateY(1px); | |||
} | |||
.mwfilter-chip:focus-visible { | |||
outline: 2px solid var(--mf-orange); | |||
outline-offset: 2px; | |||
} | |||
.mwfilter-chip.is-active { | |||
color: #fff; | |||
background: linear-gradient(180deg, var(--mf-orange-light), var(--mf-orange)); | |||
border-color: var(--mf-orange); | |||
box-shadow: 0 2px 6px rgba(245, 162, 0, 0.35); | |||
} | |||
.mwfilter-chip--star { | |||
padding: 0 10px; | |||
letter-spacing: 1px; | |||
color: #d69a00; | |||
} | |||
.mwfilter-chip--star.is-active { | |||
color: #fff; | |||
} | |||
/* 搜索框 */ | |||
.mwfilter-input { | |||
flex: 1 1 240px; | |||
min-width: 180px; | |||
max-width: 380px; | |||
height: 28px; | |||
padding: 0 11px; | |||
font-size: 13px; | |||
color: var(--mf-text); | |||
background: #fff; | |||
border: 1px solid #efd0a1; | |||
border-radius: 8px; | |||
transition: border-color 0.15s ease, box-shadow 0.15s ease; | |||
} | |||
.mwfilter-input::placeholder { | |||
color: #bda37e; | |||
} | |||
.mwfilter-input:focus { | |||
outline: none; | |||
border-color: var(--mf-orange); | |||
box-shadow: 0 0 0 3px rgba(245, 162, 0, 0.18); | |||
} | |||
/* 底部操作条 */ | |||
.mwfilter-foot { | |||
display: flex; | |||
align-items: center; | |||
justify-content: space-between; | |||
gap: 12px; | |||
padding: 8px 16px; | |||
background: var(--mf-cream); | |||
border-top: 1px dashed var(--mf-line); | |||
} | |||
.mwfilter-reset { | |||
-webkit-appearance: none; | |||
appearance: none; | |||
height: 26px; | |||
padding: 0 14px; | |||
font-size: 12.5px; | |||
color: #c07000; | |||
background: #fff; | |||
border: 1px solid #f0b95e; | |||
border-radius: 999px; | |||
cursor: pointer; | |||
transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease; | |||
} | |||
.mwfilter-reset:hover { | |||
color: #fff; | |||
background: var(--mf-orange); | |||
border-color: var(--mf-orange); | |||
} | |||
.mwfilter-reset:focus-visible { | |||
outline: 2px solid var(--mf-orange); | |||
outline-offset: 2px; | |||
} | |||
.mwfilter-hint { | |||
font-size: 12px; | |||
color: var(--mf-muted); | |||
} | |||
/* 窄屏:标签换行到上方 */ | |||
@media (max-width: 600px) { | |||
.mwfilter-row { | |||
grid-template-columns: 1fr; | |||
gap: 2px; | |||
} | |||
.mwfilter-label { | |||
padding-top: 0; | |||
} | |||
.mwfilter-input { | |||
max-width: none; | |||
} | |||
} | |||
/* 深色模式(Citizen 皮肤) */ | |||
@media (prefers-color-scheme: dark) { | |||
html.skin-theme-clientpref-os .mwfilter { | |||
--mf-line: #4a3517; | |||
--mf-cream: #221a0f; | |||
--mf-text: #f3e9da; | |||
--mf-muted: #9c8564; | |||
background: #1b150d; | |||
} | |||
html.skin-theme-clientpref-os .mwfilter-chip, | |||
html.skin-theme-clientpref-os .mwfilter-input, | |||
html.skin-theme-clientpref-os .mwfilter-reset { | |||
background: #241a0d; | |||
border-color: #5b431f; | |||
color: #f0c477; | |||
} | |||
html.skin-theme-clientpref-os .mwfilter-chip:hover { | |||
background: #2e2210; | |||
} | |||
} | |||
html.skin-theme-clientpref-night .mwfilter { | |||
--mf-line: #4a3517; | |||
--mf-cream: #221a0f; | |||
--mf-text: #f3e9da; | |||
--mf-muted: #9c8564; | |||
background: #1b150d; | |||
} | |||
html.skin-theme-clientpref-night .mwfilter-chip, | |||
html.skin-theme-clientpref-night .mwfilter-input, | |||
html.skin-theme-clientpref-night .mwfilter-reset { | |||
background: #241a0d; | |||
border-color: #5b431f; | |||
color: #f0c477; | |||
} | |||
html.skin-theme-clientpref-night .mwfilter-chip:hover { | |||
background: #2e2210; | |||
} | } | ||
2026年10月25日 (日) 21:54的版本
/* ==========================================================================
1. 系统界面清理 & 基础修正
========================================================================== */
#ca-viewsource, #ca-talk {
display: none !important;
}
pre {
white-space: pre-wrap;
overflow-wrap: break-word;
}
.wikitable {
max-width: 100%;
margin: 1em 0;
}
/* ==========================================================================
2. 交互组件:黑幕 (Heimu)
.heimu, .heimu rt {
background-color: var(--color-base, #252525);
color: var(--color-base, #252525);
text-shadow: none;
transition: color 0.13s linear, background-color 0.13s linear;
user-select: none;
}
.heimu a, a .heimu, .new .heimu {
color: var(--color-base, #252525);
}
span.heimu:hover, span.heimu:active {
background-color: transparent;
color: var(--color-base--inverted, #ffffff) !important;
user-select: text;
}
span.heimu:hover a, a:hover span.heimu { color: var(--color-primary, #add8e6) !important; }
========================================================================== */
/* ==========================================================================
3. 现代矩形自适应导航 (核心逻辑 - 彻底净化版)
========================================================================== */
/* 3.1 基础显隐逻辑 */
.adaptive-nav input[type="radio"] { display: none !important; }
.nav-content {
display: none;
overflow: hidden;
background: var(--color-surface-2, rgba(0, 0, 0, 0.05));
border-radius: 10px;
margin-bottom: 10px;
}
/* 强制显示展开的内容 */
.nav-content:not(.mw-collapsed) { display: block !important; }
/* 3.2 矩形卡片 (彻底清洗 Citizen 皮肤样式) */
.nav-text-btn.mw-customtoggle {
all: unset !important; /* 抹除皮肤默认按钮样式 */
position: relative;
cursor: pointer;
display: flex !important;
align-items: center;
justify-content: flex-start;
height: 64px;
padding: 0 24px !important;
font-weight: bold;
font-size: 18px;
color: var(--color-base, #333) !important; /* 没图时文字深色 */
border-radius: 10px;
background-color: transparent !important; /* 默认背景透明 */
border: 1px solid var(--border-color-base, rgba(0,0,0,0.1)) !important;
border-bottom: 4px solid rgba(0, 0, 0, 0.15) !important;
transition: all 0.2s ease;
overflow: hidden;
box-sizing: border-box !important;
}
/* 杀死文字内部可能的任何蓝色背景 */
.nav-text-btn span {
background: transparent !important;
padding: 0 !important;
border: none !important;
box-shadow: none !important;
z-index: 2;
}
/* 只有带 has-bg-image 类名时才显示的遮罩 */
.nav-text-btn.has-bg-image::before {
content: "";
position: absolute;
top: 0; left: 0; width: 100%; height: 100%;
background: linear-gradient(to right, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, rgba(0,0,0,0) 100%);
z-index: 1;
}
.nav-text-btn.has-bg-image { color: #fff !important; }
.nav-text-btn.has-bg-image span { text-shadow: 2px 2px 4px rgba(0,0,0,0.8); }
/* 3.3 交互反馈 */
.nav-text-btn:hover { border-color: var(--color-primary, #36c) !important; background-color: rgba(0,0,0,0.02) !important; }
.nav-text-btn:active { transform: translateY(2px); border-bottom-width: 1px !important; }
/* 3.4 背景预留区 */
.btn-bg-1, .btn-bg-2, .btn-bg-3, .btn-bg-4 { background-size: cover; background-position: center; }
/* ==========================================================================
4. 自适应逻辑 (PC网格 vs 移动端手风琴)
========================================================================== */
@media (min-width: 769px) {
.adaptive-nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 20px 0; }
.nav-module { display: contents; }
.nav-text-btn { grid-row: 1; }
.nav-content { grid-row: 2; grid-column: 1 / 5; margin-top: 10px; }
}
@media (max-width: 768px) {
.adaptive-nav { display: block; }
.nav-module { margin-bottom: 8px; }
.nav-text-btn { width: 100%; }
.nav-content { border-radius: 0 0 10px 10px; margin-top: -4px; border: 1px solid rgba(0, 0, 0, 0.1); border-top: none; }
}
/* ==========================================================================
4. 自适应分屏逻辑 (PC网格 vs 移动端手风琴)
========================================================================== */
/* PC端:横向排列按钮,内容横跨整行 */
@media (min-width: 769px) {
.adaptive-nav {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 12px;
margin: 20px 0;
}
.nav-module { display: contents; }
.nav-text-btn { grid-row: 1; }
.nav-content {
grid-row: 2;
grid-column: 1 / 5;
margin-top: 10px;
border: 1px solid var(--border-color-base, rgba(255, 255, 255, 0.1));
}
#game-1:checked ~ .nav-module #content-1,
#game-2:checked ~ .nav-module #content-2,
#game-3:checked ~ .nav-module #content-3,
#game-4:checked ~ .nav-module #content-4 {
display: block;
}
}
/* 移动端:按钮堆叠,内容就地展开 */
@media (max-width: 768px) {
.adaptive-nav { display: block; padding: 0 5px; }
.nav-module { margin-bottom: 8px; }
.nav-text-btn { width: 100%; }
.nav-content {
border-radius: 0 0 10px 10px;
margin-top: -4px;
border: 1px solid rgba(0, 0, 0, 0.1);
border-top: none;
}
/* 移动端特殊:由于 display: contents 失效,直接按顺序显示内容 */
#game-1:checked ~ .nav-module:nth-of-type(1) #content-1,
#game-2:checked ~ .nav-module:nth-of-type(2) #content-2,
#game-3:checked ~ .nav-module:nth-of-type(3) #content-3,
#game-4:checked ~ .nav-module:nth-of-type(4) #content-4 {
display: block;
}
}
/* ==========================================================================
5. 首页网格与内容样式 (原本保留)
========================================================================== */
.home-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 16px;
}
.home-card {
background: var(--color-surface-1);
border: 1px solid var(--border-color-base);
border-radius: 12px;
padding: 24px;
transition: all 0.3s ease;
}
.nav-sub-text {
margin-top: 12px;
font-weight: 600;
font-size: 14px;
color: var(--color-base);
}
@keyframes slideIn {
from { opacity: 0; transform: translateY(-5px); }
to { opacity: 1; transform: translateY(0); }
}
#custom-notetip-popup {
position: absolute;
display: none;
z-index: 10000;
background: #fff;
border: 1px solid #a2a9b1;
padding: 6px 10px;
box-shadow: 0 2px 4px rgba(0,0,0,0.2);
font-size: 14px;
pointer-events: none;
max-width: 300px;
line-height: 1.5;
}
/* ==========================================================================
6. 图鉴筛选面板(橘 / 白主色调)
由 MediaWiki:Common.js 中的 __mwFilterLoaded 生成 DOM
========================================================================== */
.AnnTools-MWFilter {
margin: 1em 0;
}
.mwfilter {
--mf-orange: #f5a200;
--mf-orange-deep: #dd8b00;
--mf-orange-light: #ffb733;
--mf-line: #f2dcb8;
--mf-cream: #fffaf2;
--mf-text: #3a2a12;
--mf-muted: #a89070;
max-width: 100%;
overflow: hidden;
font-size: 13.5px;
line-height: 1.5;
color: var(--mf-text);
background: #fff;
border: 1px solid var(--mf-line);
border-radius: 12px;
box-shadow: 0 2px 12px rgba(196, 128, 20, 0.12);
}
/* 顶部标题栏 */
.mwfilter-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 9px 16px;
color: #fff;
font-weight: 600;
letter-spacing: 0.02em;
background: linear-gradient(135deg, var(--mf-orange-light) 0%, var(--mf-orange) 55%, var(--mf-orange-deep) 100%);
}
.mwfilter-title {
display: inline-flex;
align-items: center;
gap: 8px;
min-width: 0;
}
.mwfilter-title::before {
content: "";
flex: 0 0 auto;
width: 8px;
height: 8px;
border-radius: 50%;
background: #fff;
box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
}
.mwfilter-count {
flex: 0 0 auto;
padding: 1px 10px;
font-size: 12px;
font-weight: 400;
border-radius: 999px;
background: rgba(255, 255, 255, 0.22);
white-space: nowrap;
}
/* 筛选行 */
.mwfilter-body {
display: flex;
flex-direction: column;
gap: 6px;
padding: 11px 16px 7px;
}
.mwfilter-row {
display: grid;
grid-template-columns: 58px 1fr;
align-items: start;
gap: 10px;
}
.mwfilter-label {
padding-top: 4px;
font-weight: 600;
font-size: 12.5px;
color: var(--mf-orange-deep);
white-space: nowrap;
}
.mwfilter-chips {
display: flex;
flex-wrap: wrap;
gap: 6px;
min-width: 0;
}
/* 筛选按钮 */
.mwfilter-chip {
-webkit-appearance: none;
appearance: none;
display: inline-flex;
align-items: center;
justify-content: center;
height: 26px;
padding: 0 12px;
font-size: 13px;
line-height: 1;
color: #8a5a00;
background: #fff;
border: 1px solid #efd0a1;
border-radius: 999px;
cursor: pointer;
white-space: nowrap;
transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease,
box-shadow 0.15s ease, transform 0.1s ease;
}
.mwfilter-chip:hover {
color: #c07000;
background: #fff6e8;
border-color: var(--mf-orange);
}
.mwfilter-chip:active {
transform: translateY(1px);
}
.mwfilter-chip:focus-visible {
outline: 2px solid var(--mf-orange);
outline-offset: 2px;
}
.mwfilter-chip.is-active {
color: #fff;
background: linear-gradient(180deg, var(--mf-orange-light), var(--mf-orange));
border-color: var(--mf-orange);
box-shadow: 0 2px 6px rgba(245, 162, 0, 0.35);
}
.mwfilter-chip--star {
padding: 0 10px;
letter-spacing: 1px;
color: #d69a00;
}
.mwfilter-chip--star.is-active {
color: #fff;
}
/* 搜索框 */
.mwfilter-input {
flex: 1 1 240px;
min-width: 180px;
max-width: 380px;
height: 28px;
padding: 0 11px;
font-size: 13px;
color: var(--mf-text);
background: #fff;
border: 1px solid #efd0a1;
border-radius: 8px;
transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.mwfilter-input::placeholder {
color: #bda37e;
}
.mwfilter-input:focus {
outline: none;
border-color: var(--mf-orange);
box-shadow: 0 0 0 3px rgba(245, 162, 0, 0.18);
}
/* 底部操作条 */
.mwfilter-foot {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 8px 16px;
background: var(--mf-cream);
border-top: 1px dashed var(--mf-line);
}
.mwfilter-reset {
-webkit-appearance: none;
appearance: none;
height: 26px;
padding: 0 14px;
font-size: 12.5px;
color: #c07000;
background: #fff;
border: 1px solid #f0b95e;
border-radius: 999px;
cursor: pointer;
transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.mwfilter-reset:hover {
color: #fff;
background: var(--mf-orange);
border-color: var(--mf-orange);
}
.mwfilter-reset:focus-visible {
outline: 2px solid var(--mf-orange);
outline-offset: 2px;
}
.mwfilter-hint {
font-size: 12px;
color: var(--mf-muted);
}
/* 窄屏:标签换行到上方 */
@media (max-width: 600px) {
.mwfilter-row {
grid-template-columns: 1fr;
gap: 2px;
}
.mwfilter-label {
padding-top: 0;
}
.mwfilter-input {
max-width: none;
}
}
/* 深色模式(Citizen 皮肤) */
@media (prefers-color-scheme: dark) {
html.skin-theme-clientpref-os .mwfilter {
--mf-line: #4a3517;
--mf-cream: #221a0f;
--mf-text: #f3e9da;
--mf-muted: #9c8564;
background: #1b150d;
}
html.skin-theme-clientpref-os .mwfilter-chip,
html.skin-theme-clientpref-os .mwfilter-input,
html.skin-theme-clientpref-os .mwfilter-reset {
background: #241a0d;
border-color: #5b431f;
color: #f0c477;
}
html.skin-theme-clientpref-os .mwfilter-chip:hover {
background: #2e2210;
}
}
html.skin-theme-clientpref-night .mwfilter {
--mf-line: #4a3517;
--mf-cream: #221a0f;
--mf-text: #f3e9da;
--mf-muted: #9c8564;
background: #1b150d;
}
html.skin-theme-clientpref-night .mwfilter-chip,
html.skin-theme-clientpref-night .mwfilter-input,
html.skin-theme-clientpref-night .mwfilter-reset {
background: #241a0d;
border-color: #5b431f;
color: #f0c477;
}
html.skin-theme-clientpref-night .mwfilter-chip:hover {
background: #2e2210;
}