MediaWiki:Citizen.css:修订间差异
MediaWiki界面页面
更多操作
无编辑摘要 |
无编辑摘要 |
||
| 第305行: | 第305行: | ||
} | } | ||
/* ============================================== */ | /* ============================================== */ | ||
/* --- | /* --- 13. 搜索组件对齐:统一搜索框与按钮高度 --- */ | ||
/* ============================================== */ | /* ============================================== */ | ||
/* | /* 1. 调大总容器的最大宽度上限 */ | ||
.oo-ui-actionFieldLayout { | .oo-ui-actionFieldLayout { | ||
display: flex !important; | display: flex !important; | ||
| 第313行: | 第313行: | ||
align-items: center !important; | align-items: center !important; | ||
width: 100% !important; | width: 100% !important; | ||
max-width: | /* 从 600px 提升到 900px,或者根据你的 Banner 宽度调整 */ | ||
max-width: 900px !important; | |||
margin: 10px 0 !important; /* 增加一点上下间距,避免太挤 */ | |||
} | } | ||
/* | |||
/* 2. 让输入框占据绝大部分空间 */ | |||
.oo-ui-actionFieldLayout-input { | .oo-ui-actionFieldLayout-input { | ||
flex | flex: 1 1 auto !important; /* 强制拉伸 */ | ||
margin-right: 0 !important; | margin-right: 0 !important; | ||
} | } | ||
/* | |||
/* 3. 增加输入框内部的舒适度 */ | |||
.oo-ui-actionFieldLayout-input .oo-ui-inputWidget-input { | .oo-ui-actionFieldLayout-input .oo-ui-inputWidget-input { | ||
height: | height: 46px !important; /* 稍微增高 4px,看起来更大气 */ | ||
padding-left: 15px !important; | |||
font-size: 1.1rem !important; /* 增大字号,配合宽屏 */ | |||
border-radius: 12px 0 0 12px !important; | border-radius: 12px 0 0 12px !important; | ||
border: 1px solid rgba(0, 0, 0, 0. | border: 1px solid rgba(0, 0, 0, 0.2) !important; | ||
border-right: none | border-right: none !important; | ||
} | } | ||
/* | |||
. | /* 4. 调整按钮的比例,使其与加宽的输入框协调 */ | ||
.oo-ui-actionFieldLayout-button .oo-ui-buttonElement-button { | .oo-ui-actionFieldLayout-button .oo-ui-buttonElement-button { | ||
height: | height: 46px !important; /* 高度必须同步 */ | ||
min- | min-width: 100px !important; /* 增加按钮的最小宽度 */ | ||
padding: 0 | padding: 0 30px !important; /* 增加左右内边距,让按钮也“宽”一点 */ | ||
border-radius: 0 12px 12px 0 !important; | border-radius: 0 12px 12px 0 !important; | ||
font-size: 1rem !important; | |||
} | } | ||
2026年1月30日 (五) 08:54的版本
/**
* Blockland Wiki Modern Aero UI
* 风格:Aero/Basic
* 功能:全局毛玻璃、改进动效。
* 版本:1.0
*/
/* =========================== */
/* --- 1. 全局去蓝配色基础 --- */
/* =========================== */
:root {
--color-surface-0: #fafafa !important;
--color-surface-1: #ffffff !important;
--color-surface-search: #ffffff !important;
--color-base-0: #202122 !important;
--color-heading: #000000 !important;
--background-color-interactive-subtle: rgba(0, 0, 0, 0.05) !important;
--color-primary-opacity-10: rgba(0, 0, 0, 0.05) !important;
}
/* =========================== */
/* --- 2. 通用组件毛玻璃化 --- */
/* =========================== */
.citizen-menu__card,
#citizen-preferences__card,
.citizen-sticky-header-background,
.page-actions-more__card,
.citizen-dropdown .citizen-menu__card {
background-color: rgba(255, 255, 255, 0.2) !important;
backdrop-filter: blur(14px) saturate(100%) !important;
-webkit-backdrop-filter: blur(14px) saturate(100%) !important;
border: 1px solid rgba(0, 0, 0, 0.1) !important;
border-radius: 12px !important;
}
/* =========================== */
/* --- 3. 搜索面板背景遮罩 --- */
/* =========================== */
.citizen-command-palette-backdrop {
background-color: rgba(0, 0, 0, 0.2) !important;
backdrop-filter: blur(8px) !important;
-webkit-backdrop-filter: blur(8px) !important;
z-index: 9999 !important;
animation: citizen-fade-in 0.3s ease forwards;
}
/* ======================= */
/* --- 4. 搜索面板主体 --- */
/* ======================= */
.citizen-command-palette {
position: fixed !important;
width: 1000px !important;
max-width: 92vw !important;
top: 50% !important;
left: 50% !important;
z-index: 10000 !important;
isolation: isolate !important;
background-color: rgba(255, 255, 255, 0.45) !important;
backdrop-filter: blur(25px) saturate(100%) !important;
-webkit-backdrop-filter: blur(25px) saturate(100%) !important;
border-radius: 24px !important;
border: 1px solid rgba(255, 255, 255, 0.5) !important;
box-shadow: 0 40px 100px rgba(0, 0, 0, 0.25) !important;
animation: citizen-pop-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
transform-origin: center center !important;
}
/* ================================= */
/* --- 5. 列表项布局与全填充圆角 --- */
/* ================================= */
.citizen-command-palette-list {
padding: 8px 0 !important;
}
.citizen-command-palette-list-item {
margin: 0 12px 6px 12px !important;
border-radius: 12px !important;
overflow: hidden !important;
border: none !important;
display: block !important;
transition: background-color 0.2s ease !important;
}
.citizen-command-palette-list-item__content {
display: flex !important;
padding: 12px 16px !important;
width: 100% !important;
box-sizing: border-box !important;
background: transparent !important;
color: #202122 !important;
}
.citizen-command-palette-list-item__metadata {
display: none !important;
}
.citizen-command-palette-list-item:hover,
.citizen-command-palette-list-item[aria-selected="true"] {
background-color: rgba(0, 0, 0, 0.05) !important;
}
/* ========================= */
/* --- 6. 垃圾桶按钮优化 --- */
/* ========================= */
.citizen-command-palette-list-item__actions,
.citizen-command-palette-list-item__action {
background: transparent !important;
background-color: transparent !important;
border: none !important;
box-shadow: none !important;
min-width: 32px !important;
display: flex !important;
justify-content: center !important;
align-items: center !important;
margin-left: auto !important;
}
.citizen-command-palette-list-item__action svg {
fill: #202122 !important;
opacity: 0.85 !important;
transition: all 0.2s ease !important;
}
/* 悬停状态:浅粉色背景 + 变大红图标 */
.citizen-command-palette-list-item__action:hover {
background-color: rgba(255, 192, 203, 0.6) !important;
border-radius: 8px !important;
}
.citizen-command-palette-list-item__action:hover svg {
fill: #d33 !important;
opacity: 1 !important;
transform: scale(1.15) !important;
}
/* =========================== */
/* --- 7. 搜索框与底部清理 --- */
/* =========================== */
.citizen-command-palette__search,
.citizen-command-palette__results,
.citizen-command-palette__footer,
.cdx-text-input__input {
background: transparent !important;
border: none !important;
box-shadow: none !important;
}
/* --- 动画定义 --- */
@keyframes citizen-pop-in {
0% { opacity: 0; transform: translate(-50%, -45%) scale(0.85); }
100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes citizen-fade-in {
from { opacity: 0; }
to { opacity: 1; }
}
/* ========================================= */
/* --- 8. 彻底移除主题切换功能并强制浅色 --- */
/* ========================================= */
#skin-client-prefs-skin-theme {
display: none !important;
}
/* 强制覆盖所有深色模式变量,确保即便系统是深色,维基也保持白色 */
:root,
html.skin-theme-clientpref-night {
--color-surface-0: #fafafa !important;
--color-surface-1: #ffffff !important;
--color-surface-2: #ffffff !important;
--color-surface-search: #ffffff !important;
--color-base-0: #202122 !important;
--color-base-30: #54595d !important;
--color-heading: #000000 !important;
background-color: #ffffff !important;
color: #202122 !important;
}
/* 移除之前代码中所有针对深色模式的特殊背景色定义,统一为白色毛玻璃 */
html.skin-theme-clientpref-night .citizen-command-palette {
background-color: rgba(255, 255, 255, 0.85) !important;
backdrop-filter: blur(25px) saturate(0%) !important;
}
html.skin-theme-clientpref-night .citizen-command-palette-list-item:hover,
html.skin-theme-clientpref-night .citizen-command-palette-list-item[aria-selected="true"] {
background-color: rgba(0, 0, 0, 0.05) !important;
}
/* =============================== */
/* --- 9. 顶部UI去圆角嵌套直角 --- */
/* =============================== */
.citizen-sticky-header-background {
border-radius: 0 !important;
left: 0 !important;
right: 0 !important;
width: 100% !important;
top: 0 !important;
border: none !important;
border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
}
.citizen-sticky-header {
border-radius: 0 !important;
}
/* ================================================ */
/* --- 10. 能效模式适配:开启后关闭毛玻璃与动画 --- */
/* ================================================ */
/* 当 html 标签包含 performance-mode...-1 时,判定为能效模式开启。此时彻底干掉毛玻璃和动画。*/
html[class*="citizen-feature-performance-mode-clientpref-1"] {
/* 禁用全局毛玻璃变量 */
--citizen-backdrop-filter: none !important;
}
/* 移除所有组件的滤镜,并提升背景不透明度 */
html[class*="citizen-feature-performance-mode-clientpref-1"] .citizen-menu__card,
html[class*="citizen-feature-performance-mode-clientpref-1"] #citizen-preferences__card,
html[class*="citizen-feature-performance-mode-clientpref-1"] .citizen-sticky-header-background,
html[class*="citizen-feature-performance-mode-clientpref-1"] .citizen-command-palette,
html[class*="citizen-feature-performance-mode-clientpref-1"] .citizen-command-palette-backdrop,
html[class*="citizen-feature-performance-mode-clientpref-1"] .page-actions-more__card {
backdrop-filter: none !important;
-webkit-backdrop-filter: none !important;
/* 消除毛玻璃 */
background-color: rgba(255, 255, 255, 1) !important;
/* 移除动画 */
animation: citizen-fade-in 0.1s ease forwards !important;
}
/* 针对搜索面板的额外性能优化 */
html[class*="citizen-feature-performance-mode-clientpref-1"] .citizen-command-palette {
/* 强行锁定位置与缩放,不进行任何位移计算 */
transform: translate(-50%, -50%) scale(1) !important;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important; /* 减弱阴影渲染 */
}
/*===============================*/
.page-首页 .banner-image {
--banner-image-url: url("https://cdn.jsdelivr.net/gh/KKBlockE/BlocklandPicturebed@main/main/d49dd42343ab1bfcf4efa67f62f4ecf8.png");
--banner-image-height: 70vh;
background-image: linear-gradient(to top, var(--color-surface-0) 15%, transparent 150%), var(--banner-image-url);
background-size: cover;
background-position: top;
height: var(--banner-image-height);
margin-bottom: calc(-1 * var(--banner-image-height));
}
/* =============================================== */
/* --- 11. 标签美化:能效模式改名 Aero / Basic --- */
/* =============================================== */
label[for="skin-client-pref-citizen-feature-performance-mode-value-1"],
label[for="skin-client-pref-citizen-feature-performance-mode-value-0"] {
color: transparent !important;
position: relative !important;
min-width: 80px !important;
text-align: center !important;
}
/* 注入 Aero */
label[for="skin-client-pref-citizen-feature-performance-mode-value-0"]::after {
content: "Aero" !important;
position: absolute !important;
left: 50% !important;
top: 50% !important;
transform: translate(-50%, -50%) !important;
color: #202122 !important;
font-size: 0.9rem !important;
font-weight: bold !important;
visibility: visible !important;
}
/* 注入 Basic */
label[for="skin-client-pref-citizen-feature-performance-mode-value-1"]::after {
content: "Basic" !important;
position: absolute !important;
left: 50% !important;
top: 50% !important;
transform: translate(-50%, -50%) !important;
color: #202122 !important;
font-size: 0.9rem !important;
font-weight: bold !important;
visibility: visible !important;
}
.citizen-menu #skin-client-pref-citizen-feature-performance-mode-group {
}
#citizen-preferences__card .mw-portlet.mw-portlet-performance-mode-group .citizen-menu__heading,
#citizen-preferences__card .citizen-menu:nth-last-child(1) .citizen-menu__heading {
font-size: 0 !important;
}
#citizen-preferences__card .mw-portlet.mw-portlet-performance-mode-group .citizen-menu__heading::before,
#citizen-preferences__card .citizen-menu:nth-last-child(1) .citizen-menu__heading::before {
content: "主题" !important;
font-size: 0.85rem !important;
font-weight: 500 !important;
letter-spacing: 0.1em !important;
text-transform: uppercase !important;
color: #193773 !important;
visibility: visible !important;
}
/* ======================== */
/* === 12. 首页专用样式 === */
/* ======================== */
/* 创建一个全宽容器的类,用于包裹Banner */
.full-width-banner {
width: 100vw; /* 视口宽度 */
position: relative;
left: 50%;
right: 50%;
margin-left: -50vw;
margin-right: -50vw;
overflow: hidden;
/* 下面是 Banner 的高度和背景设置 */
height: 400px; /* 你想要的高度 */
background-size: cover;
background-position: center;
display: flex;
align-items: center;
justify-content: center;
color: white; /* 文字颜色 */
text-shadow: 0 2px 10px rgba(0,0,0,0.7); /* 文字阴影,防止背景太亮看不清 */
z-index: 1; /* 确保不被底层遮挡 */
background-repeat: no-repeat; /* 防止图片重复 */
background-color: #2a2a2a; /* 给一个深灰色底,图片加载失败时保底 */
}
.banner-content {
max-width: 1200px; /* 内容最大宽度,保持中间对齐 */
padding: 20px;
text-align: center;
}
/* ============================================== */
/* --- 13. 搜索组件对齐:统一搜索框与按钮高度 --- */
/* ============================================== */
/* 1. 调大总容器的最大宽度上限 */
.oo-ui-actionFieldLayout {
display: flex !important;
flex-direction: row !important;
align-items: center !important;
width: 100% !important;
/* 从 600px 提升到 900px,或者根据你的 Banner 宽度调整 */
max-width: 900px !important;
margin: 10px 0 !important; /* 增加一点上下间距,避免太挤 */
}
/* 2. 让输入框占据绝大部分空间 */
.oo-ui-actionFieldLayout-input {
flex: 1 1 auto !important; /* 强制拉伸 */
margin-right: 0 !important;
}
/* 3. 增加输入框内部的舒适度 */
.oo-ui-actionFieldLayout-input .oo-ui-inputWidget-input {
height: 46px !important; /* 稍微增高 4px,看起来更大气 */
padding-left: 15px !important;
font-size: 1.1rem !important; /* 增大字号,配合宽屏 */
border-radius: 12px 0 0 12px !important;
border: 1px solid rgba(0, 0, 0, 0.2) !important;
border-right: none !important;
}
/* 4. 调整按钮的比例,使其与加宽的输入框协调 */
.oo-ui-actionFieldLayout-button .oo-ui-buttonElement-button {
height: 46px !important; /* 高度必须同步 */
min-width: 100px !important; /* 增加按钮的最小宽度 */
padding: 0 30px !important; /* 增加左右内边距,让按钮也“宽”一点 */
border-radius: 0 12px 12px 0 !important;
font-size: 1rem !important;
}