MediaWiki:Citizen.css:修订间差异
MediaWiki界面页面
更多操作
无编辑摘要 |
无编辑摘要 |
||
| 第1行: | 第1行: | ||
/ | // ==UserScript== | ||
// @name Blockland Wiki 极致全能毛玻璃-V27 | |||
// @version 27.0 | |||
// @description 修复菜单模糊失效 + 彻底消除导航按钮黑框边框 | |||
// @author Gemini | |||
// @match *://blockland.wiki/* | |||
// @run-at document-start | |||
// @grant none | |||
// ==/UserScript== | |||
(function() { | |||
'use strict'; | |||
/* | const css = ` | ||
.citizen- | /* ============================================================ | ||
1. 导航按钮边框修复 (彻底清空黑框与残留) | |||
============================================================ */ | |||
/* 针对你给出的 <summary> 和 <details> 结构 */ | |||
.citizen-header__item.citizen-drawer, | |||
.citizen-dropdown-details, | |||
.citizen-dropdown-summary, | |||
.citizen-header__item.citizen-dropdown { | |||
border: none !important; | |||
border-color: transparent !important; | |||
outline: none !important; | |||
box-shadow: none !important; | |||
background-color: transparent !important; | |||
} | background: transparent !important; | ||
-webkit-tap-highlight-color: transparent !important; | |||
} | |||
/* | /* 消除点击时的焦点虚线框 */ | ||
.citizen-dropdown-summary::-webkit-details-marker, | |||
.citizen-dropdown-summary::marker { | |||
display: none !important; | |||
} | |||
.citizen- | |||
} | |||
/* | /* ============================================================ | ||
.citizen- | 2. 侧边菜单模糊修复 (针对 #citizen-drawer__card) | ||
#citizen- | ============================================================ */ | ||
/* 核心:将模糊效果绑定到你代码中的 ID 选择器 */ | |||
#citizen-drawer__card.citizen-menu__card { | |||
background-color: rgba(255, 255, 255, 0.2) !important; /* 透明度必须低,模糊才明显 */ | |||
} | backdrop-filter: blur(16px) saturate(150%) !important; | ||
-webkit-backdrop-filter: blur(16px) saturate(150%) !important; | |||
border: 1px solid rgba(255, 255, 255, 0.3) !important; | |||
border-radius: 12px !important; | |||
box-shadow: 0 8px 32px rgba(0,0,0,0.1) !important; | |||
/* 唤醒硬件加速 */ | |||
transform: translateZ(0); | |||
will-change: backdrop-filter; | |||
} | |||
/* | /* 关键补丁:强制让内层所有容器透明,否则会遮挡模糊 */ | ||
.citizen- | #citizen-drawer__card .citizen-menu__card-content, | ||
#citizen-drawer__card .citizen-drawer__header, | |||
#citizen-drawer__card .citizen-main-menu, | |||
} | #citizen-drawer__card section { | ||
background: transparent !important; | |||
background-color: transparent !important; | |||
border: none !important; | |||
} | |||
/* | /* ============================================================ | ||
.citizen-command-palette | 3. 搜索面板 (保持 V26 优秀的 1000px 布局) | ||
============================================================ */ | |||
.citizen-command-palette { | |||
width: 1000px !important; | |||
max-width: 95vw !important; | |||
background-color: rgba(255, 255, 255, 0.7) !important; | |||
backdrop-filter: blur(20px) saturate(110%) !important; | |||
-webkit-backdrop-filter: blur(20px) saturate(110%) !important; | |||
border-radius: 20px !important; | |||
} | transform: translate(-50%, -50%) translateZ(0) !important; | ||
} | |||
/* | /* ============================================================ | ||
html.skin-theme-clientpref-night | 4. 夜间模式适配 | ||
html.skin-theme-clientpref-night .citizen-command-palette { | ============================================================ */ | ||
html.skin-theme-clientpref-night #citizen-drawer__card, | |||
html.skin-theme-clientpref-night .citizen-command-palette { | |||
background-color: rgba(20, 20, 25, 0.5) !important; | |||
} | border: 1px solid rgba(255, 255, 255, 0.1) !important; | ||
} | |||
`; | |||
// 注入样式 | |||
const style = document.createElement('style'); | |||
style.id = 'blockland-v27-fix'; | |||
style.innerHTML = css; | |||
document.documentElement.appendChild(style); | |||
})(); | |||
2026年1月29日 (四) 19:57的版本
// ==UserScript==
// @name Blockland Wiki 极致全能毛玻璃-V27
// @version 27.0
// @description 修复菜单模糊失效 + 彻底消除导航按钮黑框边框
// @author Gemini
// @match *://blockland.wiki/*
// @run-at document-start
// @grant none
// ==/UserScript==
(function() {
'use strict';
const css = `
/* ============================================================
1. 导航按钮边框修复 (彻底清空黑框与残留)
============================================================ */
/* 针对你给出的 <summary> 和 <details> 结构 */
.citizen-header__item.citizen-drawer,
.citizen-dropdown-details,
.citizen-dropdown-summary,
.citizen-header__item.citizen-dropdown {
border: none !important;
border-color: transparent !important;
outline: none !important;
box-shadow: none !important;
background-color: transparent !important;
background: transparent !important;
-webkit-tap-highlight-color: transparent !important;
}
/* 消除点击时的焦点虚线框 */
.citizen-dropdown-summary::-webkit-details-marker,
.citizen-dropdown-summary::marker {
display: none !important;
}
/* ============================================================
2. 侧边菜单模糊修复 (针对 #citizen-drawer__card)
============================================================ */
/* 核心:将模糊效果绑定到你代码中的 ID 选择器 */
#citizen-drawer__card.citizen-menu__card {
background-color: rgba(255, 255, 255, 0.2) !important; /* 透明度必须低,模糊才明显 */
backdrop-filter: blur(16px) saturate(150%) !important;
-webkit-backdrop-filter: blur(16px) saturate(150%) !important;
border: 1px solid rgba(255, 255, 255, 0.3) !important;
border-radius: 12px !important;
box-shadow: 0 8px 32px rgba(0,0,0,0.1) !important;
/* 唤醒硬件加速 */
transform: translateZ(0);
will-change: backdrop-filter;
}
/* 关键补丁:强制让内层所有容器透明,否则会遮挡模糊 */
#citizen-drawer__card .citizen-menu__card-content,
#citizen-drawer__card .citizen-drawer__header,
#citizen-drawer__card .citizen-main-menu,
#citizen-drawer__card section {
background: transparent !important;
background-color: transparent !important;
border: none !important;
}
/* ============================================================
3. 搜索面板 (保持 V26 优秀的 1000px 布局)
============================================================ */
.citizen-command-palette {
width: 1000px !important;
max-width: 95vw !important;
background-color: rgba(255, 255, 255, 0.7) !important;
backdrop-filter: blur(20px) saturate(110%) !important;
-webkit-backdrop-filter: blur(20px) saturate(110%) !important;
border-radius: 20px !important;
transform: translate(-50%, -50%) translateZ(0) !important;
}
/* ============================================================
4. 夜间模式适配
============================================================ */
html.skin-theme-clientpref-night #citizen-drawer__card,
html.skin-theme-clientpref-night .citizen-command-palette {
background-color: rgba(20, 20, 25, 0.5) !important;
border: 1px solid rgba(255, 255, 255, 0.1) !important;
}
`;
// 注入样式
const style = document.createElement('style');
style.id = 'blockland-v27-fix';
style.innerHTML = css;
document.documentElement.appendChild(style);
})();