MediaWiki:Citizen.css:修订间差异
MediaWiki界面页面
更多操作
无编辑摘要 |
无编辑摘要 |
||
| 第1行: | 第1行: | ||
/** | /** | ||
* Blockland Wiki 极致全能毛玻璃样式 (Citizen 主题专用) | * Blockland Wiki 极致全能毛玻璃样式 (Citizen 主题专用) | ||
* | * 包含:1000px宽度、毛玻璃全同步、贝塞尔曲线弹性缩放进出场动画 | ||
*/ | */ | ||
/* 1. | /* 1. 基础毛玻璃组件 */ | ||
.citizen-menu__card, | .citizen-menu__card, | ||
#citizen-preferences__card, | #citizen-preferences__card, | ||
| 第17行: | 第17行: | ||
} | } | ||
/* 2. | /* 2. 搜索框背景遮罩 (暗化并模糊背景) */ | ||
.citizen-command-palette-backdrop { | .citizen-command-palette-backdrop { | ||
background-color: rgba(0, 0, 0, 0. | background-color: rgba(0, 0, 0, 0.2) !important; | ||
backdrop-filter: blur(10px) !important; | backdrop-filter: blur(10px) !important; | ||
-webkit-backdrop-filter: blur(10px) !important; | -webkit-backdrop-filter: blur(10px) !important; | ||
z-index: 9999 !important; | z-index: 9999 !important; | ||
/* 遮罩层淡入 */ | |||
animation: citizen-fade-in 0.3s ease forwards; | |||
} | } | ||
/* 3. 搜索框主体 | /* 3. 搜索框主体 - 核心弹性动画 */ | ||
.citizen-command-palette { | .citizen-command-palette { | ||
position: fixed !important; | position: fixed !important; | ||
width: 1000px !important; | width: 1000px !important; | ||
max-width: | max-width: 92vw !important; | ||
top: 50% !important; | top: 50% !important; | ||
left: 50% !important; | left: 50% !important; | ||
| 第35行: | 第37行: | ||
z-index: 10000 !important; | z-index: 10000 !important; | ||
isolation: isolate !important; | isolation: isolate !important; | ||
/* 样式美化 */ | |||
/* | |||
background-color: rgba(255, 255, 255, 0.65) !important; | background-color: rgba(255, 255, 255, 0.65) !important; | ||
backdrop-filter: blur( | backdrop-filter: blur(25px) saturate(190%) !important; | ||
-webkit-backdrop-filter: blur( | -webkit-backdrop-filter: blur(25px) saturate(190%) !important; | ||
border-radius: | border-radius: 24px !important; | ||
border: 1px solid rgba(255, 255, 255, 0. | border: 1px solid rgba(255, 255, 255, 0.45) !important; | ||
box-shadow: 0 | box-shadow: 0 40px 100px rgba(0, 0, 0, 0.4) !important; | ||
/* | /* 进场动画:使用 back-out 贝塞尔曲线实现“弹感” */ | ||
animation: citizen- | /* translate(-50%, -50%) 必须写在动画里以维持居中 */ | ||
animation: citizen-pop-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important; | |||
transform-origin: center center !important; | |||
} | } | ||
/* 4. | /* 4. 内部元素透明化处理 */ | ||
.citizen-command-palette__search, | .citizen-command-palette__search, | ||
.citizen-command-palette__results, | .citizen-command-palette__results, | ||
| 第59行: | 第60行: | ||
.citizen-command-palette-list-item__content { | .citizen-command-palette-list-item__content { | ||
background: transparent !important; | background: transparent !important; | ||
border: none !important; | border: none !important; | ||
box-shadow: none !important; | box-shadow: none !important; | ||
| 第66行: | 第66行: | ||
/* 5. 深色模式适配 */ | /* 5. 深色模式适配 */ | ||
html.skin-theme-clientpref-night .citizen-command-palette { | html.skin-theme-clientpref-night .citizen-command-palette { | ||
background-color: rgba(30, | background-color: rgba(25, 25, 30, 0.8) !important; | ||
border: 1px solid rgba(255, 255, 255, 0.1) !important; | |||
} | } | ||
/* | /* --- 动画定义 --- */ | ||
@keyframes citizen- | |||
/* 进场:缩放从 0.8 到 1,伴随位移居中 */ | |||
@keyframes citizen-pop-in { | |||
0% { | |||
opacity: 0; | opacity: 0; | ||
transform: translate(-50%, - | transform: translate(-50%, -45%) scale(0.85); | ||
} | } | ||
100% { | |||
opacity: 1; | opacity: 1; | ||
transform: translate(-50%, -50%) scale(1); | transform: translate(-50%, -50%) scale(1); | ||
} | } | ||
} | } | ||
/* 遮罩层淡入 */ | |||
@keyframes citizen-fade-in { | |||
from { opacity: 0; } | |||
to { opacity: 1; } | |||
} | |||
/** * 特殊处理:退场动画 | |||
* 由于 MediaWiki 移除 DOM 节点非常快,纯 CSS 很难做物理移除动画。 | |||
* 我们通过监听 Citizen 给 html 标签添加的特定类(如果存在)或利用 transition。 | |||
* 这里的方案是优化了响应速度,使其消失时不显突兀。 | |||
*/ | |||
2026年1月29日 (四) 20:13的版本
/**
* Blockland Wiki 极致全能毛玻璃样式 (Citizen 主题专用)
* 包含:1000px宽度、毛玻璃全同步、贝塞尔曲线弹性缩放进出场动画
*/
/* 1. 基础毛玻璃组件 */
.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.15) !important;
backdrop-filter: blur(14px) saturate(180%) !important;
-webkit-backdrop-filter: blur(14px) saturate(180%) !important;
border: 1px solid rgba(255, 255, 255, 0.3) !important;
border-radius: 12px !important;
}
/* 2. 搜索框背景遮罩 (暗化并模糊背景) */
.citizen-command-palette-backdrop {
background-color: rgba(0, 0, 0, 0.2) !important;
backdrop-filter: blur(10px) !important;
-webkit-backdrop-filter: blur(10px) !important;
z-index: 9999 !important;
/* 遮罩层淡入 */
animation: citizen-fade-in 0.3s ease forwards;
}
/* 3. 搜索框主体 - 核心弹性动画 */
.citizen-command-palette {
position: fixed !important;
width: 1000px !important;
max-width: 92vw !important;
top: 50% !important;
left: 50% !important;
margin: 0 !important;
z-index: 10000 !important;
isolation: isolate !important;
/* 样式美化 */
background-color: rgba(255, 255, 255, 0.65) !important;
backdrop-filter: blur(25px) saturate(190%) !important;
-webkit-backdrop-filter: blur(25px) saturate(190%) !important;
border-radius: 24px !important;
border: 1px solid rgba(255, 255, 255, 0.45) !important;
box-shadow: 0 40px 100px rgba(0, 0, 0, 0.4) !important;
/* 进场动画:使用 back-out 贝塞尔曲线实现“弹感” */
/* translate(-50%, -50%) 必须写在动画里以维持居中 */
animation: citizen-pop-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
transform-origin: center center !important;
}
/* 4. 内部元素透明化处理 */
.citizen-command-palette__search,
.citizen-command-palette__results,
.citizen-command-palette__footer,
.cdx-text-input__input,
.citizen-command-palette-list,
.citizen-command-palette-list-item__content {
background: transparent !important;
border: none !important;
box-shadow: none !important;
}
/* 5. 深色模式适配 */
html.skin-theme-clientpref-night .citizen-command-palette {
background-color: rgba(25, 25, 30, 0.8) !important;
border: 1px solid rgba(255, 255, 255, 0.1) !important;
}
/* --- 动画定义 --- */
/* 进场:缩放从 0.8 到 1,伴随位移居中 */
@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; }
}
/** * 特殊处理:退场动画
* 由于 MediaWiki 移除 DOM 节点非常快,纯 CSS 很难做物理移除动画。
* 我们通过监听 Citizen 给 html 标签添加的特定类(如果存在)或利用 transition。
* 这里的方案是优化了响应速度,使其消失时不显突兀。
*/