MediaWiki:Common.css:修订间差异

来自尘月维基
跳转到导航 跳转到搜索
Maintenance script​(留言 | 贡献)
玻璃拟态强化
Admin​(留言 | 贡献)
排版:放开源码编辑标签 + 工具条样式
 
(未显示2个用户的27个中间版本)
第1行: 第1行:
/* ===== 尘月维基 玻璃拟态(重点:板块卡片) ===== */
/* ===== 尘月维基 · Vector 经典皮肤(对齐参考站) =====
:root {
  参考站本身几乎没有自定义 CSS,外观全部由首页内联样式表格实现。
--wiki-purple: #4b2e83;
  这里只做三件事:中文字体、站标尺寸、去点击虚线框。
}
*/


/* 明显的紫蓝渐变背景(玻璃要有底色才看得出) */
html,
body {
body {
background: linear-gradient(135deg, #d9c9f3 0%, #efe9fc 45%, #cfe1f9 100%) !important;
font-family: -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
background-attachment: fixed !important;
background-repeat: no-repeat !important;
min-height: 100%;
}
}


/* 所有中间容器透明,让渐变透上来(否则白底盖住玻璃) */
/* 站标:左侧栏顶部,10em 宽、等比不拉伸 */
.mw-page-container,
#p-logo a.mw-wiki-logo {
.mw-page-container-inner,
display: block;
.mw-body,
width: 10em;
.mw-body-content,
height: 8em;
#content,
background-image: url(/logo.jpg);
.mw-content-container,
background-repeat: no-repeat;
.mw-article-container,
background-position: center center;
.vector-page-titlebar,
background-size: contain;
.mw-body-header {
background: transparent !important;
box-shadow: none !important;
}
}


/* 顶栏:深色玻璃 */
/* 内容区最小高度,避免空页面太短 */
.mw-header,
#content {
.vector-header-container {
min-height: 60vh;
background: rgba(27, 27, 27, 0.55) !important;
-webkit-backdrop-filter: blur(18px) saturate(170%);
backdrop-filter: blur(18px) saturate(170%);
border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
}
.vector-header-container a,
.mw-header a,
.vector-header-container .vector-menu-heading { color: #fff !important; }
.vector-header-container a:hover { color: #cfc3ec !important; }
.vector-search-box .cdx-text-input__input { color: #fff !important; }


/* 侧栏:白色玻璃 + 默认展开 */
/* 首页板块表格里的图片不被撑破 */
#mw-panel,
.mw-parser-output table img {
.vector-main-menu,
max-width: 100%;
.vector-main-menu-drawer,
height: auto;
.vector-main-menu-drawer-container {
background: rgba(255, 255, 255, 0.5) !important;
-webkit-backdrop-filter: blur(20px) saturate(160%);
backdrop-filter: blur(20px) saturate(160%);
border: 1px solid rgba(255, 255, 255, 0.7);
border-radius: 16px;
box-shadow: 0 8px 30px rgba(75, 46, 131, 0.12);
}
}
@media (min-width: 1000px) {
 
.vector-main-menu-drawer-container,
/* 去掉链接点击后的虚线框 */
.vector-main-menu-drawer {
a:focus {
transform: none !important;
outline: none;
visibility: visible !important;
position: static !important;
}
}
}
.vector-menu-heading { color: var(--wiki-purple); font-weight: 700; }


/* 横幅:紫色玻璃 */
/* ===== 板块右上角「编辑内容」按钮 =====
.site-banner {
  默认 display:none —— 匿名访客从首屏渲染起就看不到,不会闪一下。
display: flex;
  body.mw-editable 由 MediaWiki 核心仅在有编辑权限的登录用户身上输出。 */
align-items: center;
.card-edit {
justify-content: space-between;
display: none;
gap: 18px;
float: right;
background: linear-gradient(135deg, rgba(75, 46, 131, 0.86), rgba(107, 78, 168, 0.7)) !important;
margin: 0 14px 0 0;
-webkit-backdrop-filter: blur(14px);
font-size: 12px;
backdrop-filter: blur(14px);
font-weight: 400;
color: #fff;
letter-spacing: 0;
border: 1px solid rgba(255, 255, 255, 0.3);
line-height: 1.9;
border-radius: 20px;
}
padding: 22px 28px;
body.mw-editable .card-edit {
margin-bottom: 20px;
display: block;
box-shadow: 0 14px 40px rgba(75, 46, 131, 0.3);
}
.card-edit a {
display: inline-block;
padding: 0 9px;
color: #ffffff !important;
text-decoration: none;
border: 1px solid rgba(255, 255, 255, 0.55);
border-radius: 11px;
background: rgba(255, 255, 255, 0.14);
}
}
.banner-text { flex: 1 1 auto; }
.card-edit a.external {
.banner-title { font-size: 28px; font-weight: 800; letter-spacing: 2px; }
background-image: none !important;
.banner-sub { font-size: 14px; opacity: .92; margin-top: 8px; line-height: 1.7; }
padding-right: 9px !important;
.banner-logo {
}
flex: 0 0 auto;
.card-edit a:hover {
width: 96px; height: 96px;
background: #ffffff;
background-image: url(/logo.jpg);
border-color: #ffffff;
background-size: contain;
color: #510DAB !important;
background-repeat: no-repeat;
background-position: center;
border-radius: 50%;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
}


/* 板块卡片:玻璃拟态(半透明 + 模糊 + 高光边框 + 柔影) */
/* 板块正文最小高度:内容为空时框不塌 */
.block {
.cb { min-height: 300px; }
background: rgba(255, 255, 255, 0.4) !important;
.cb-tall { min-height: 380px; }
-webkit-backdrop-filter: blur(20px) saturate(180%);
 
backdrop-filter: blur(20px) saturate(180%);
/* 两个编辑入口并存:「编辑」=可视化;「排版编辑」=源码+排版工具条 */
border: 1px solid rgba(255, 255, 255, 0.75) !important;
#ca-ve-edit ~ #ca-edit {
border-radius: 20px !important;
display: inline-block !important;
overflow: hidden;
margin-bottom: 20px;
box-shadow: 0 12px 38px rgba(75, 46, 131, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
}
.block-title {
 
background: linear-gradient(135deg, rgba(75, 46, 131, 0.9), rgba(107, 78, 168, 0.75)) !important;
/* 板块正文里的标题:去掉「[编辑]」小链接,字号收敛成清晰的三级层次 */
color: #fff;
.cb .mw-editsection,
text-align: center;
.cb-tall .mw-editsection { display: none !important; }
font-size: 18px;
 
.cb .mw-heading,
.cb-tall .mw-heading { margin: 0.5em 0; }
 
.cb h1, .cb-tall h1 { font-size: 165%; }
.cb h2, .cb-tall h2 { font-size: 135%; }
.cb h3, .cb-tall h3 { font-size: 118%; }
.cb h4, .cb-tall h4 { font-size: 105%; }
.cb h1, .cb h2, .cb h3, .cb h4, .cb h5, .cb h6,
.cb-tall h1, .cb-tall h2, .cb-tall h3, .cb-tall h4, .cb-tall h5, .cb-tall h6 {
border-bottom: none !important;
margin: 0.35em 0;
line-height: 1.45;
color: #222222;
font-weight: 700;
font-weight: 700;
letter-spacing: 2px;
padding: 12px 0;
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
}
.block-body { padding: 18px 20px; line-height: 1.85; color: #2b2b2b; }


/* 两列并排 */
/* 新建页面入口:仅登录且有编辑权的管理员可见 */
.card-row {
body:not(.mw-editable) #n-创建新页面{display:none}
display: grid;
#n-创建新页面 a{font-weight:700}
grid-template-columns: 1fr 1fr;
 
gap: 20px;
/* ===== 排版工具条(源代码编辑器) =====
margin-bottom: 20px;
  工具条按钮由 MediaWiki:Common.js 注入,这里只管外观:
  让「颜色 / 字号 / 对齐 / 插图 / 调图」在灰色工具条里显眼一点。 */
#wikiEditor-ui-toolbar .group-layout .tool-select > .label {
background: #6b3fa0;
color: #ffffff !important;
border-radius: 4px;
padding: 2px 10px;
margin: 2px 1px;
font-weight: 700;
}
#wikiEditor-ui-toolbar .group-layout .tool-select > .label:hover {
background: #8552c2;
}
#wikiEditor-ui-toolbar .group-layout .tool-button {
font-weight: 700;
color: #6b3fa0;
}
}
.card-row .block { margin-bottom: 0; }
#wikiEditor-ui-toolbar .group-layout .tool-select .menu .option {
@media (max-width: 700px) {
padding: 4px 12px;
.card-row { grid-template-columns: 1fr; }
white-space: nowrap;
}
}


/* 外观/参数设置等默认菜单:彻底隐藏,无入口按钮 */
/* 图片对话框里的「去上传」提示 */
#pt-preferences,
.chenyue-img-hint {
#pt-watchlist,
margin: 14px 0 0;
#pt-mycontris,
font-size: 92%;
.vector-user-menu #pt-preferences,
}
.vector-user-menu #pt-watchlist,
.chenyue-img-hint a {
.vector-user-menu #pt-mycontris { display: none !important; }
color: #6b3fa0;
 
font-weight: 700;
/* 隐藏页脚 MediaWiki 品牌 */
}
#footer-poweredby,
.mw-footer__content .footer-poweredby,
#f-poweredbyimg { display: none !important; }

2026年10月31日 (六) 17:48的最新版本

/* ===== 尘月维基 · Vector 经典皮肤(对齐参考站) =====
   参考站本身几乎没有自定义 CSS,外观全部由首页内联样式表格实现。
   这里只做三件事:中文字体、站标尺寸、去点击虚线框。
*/

body {
	font-family: -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

/* 站标:左侧栏顶部,10em 宽、等比不拉伸 */
#p-logo a.mw-wiki-logo {
	display: block;
	width: 10em;
	height: 8em;
	background-image: url(/logo.jpg);
	background-repeat: no-repeat;
	background-position: center center;
	background-size: contain;
}

/* 内容区最小高度,避免空页面太短 */
#content {
	min-height: 60vh;
}

/* 首页板块表格里的图片不被撑破 */
.mw-parser-output table img {
	max-width: 100%;
	height: auto;
}

/* 去掉链接点击后的虚线框 */
a:focus {
	outline: none;
}

/* ===== 板块右上角「编辑内容」按钮 =====
   默认 display:none —— 匿名访客从首屏渲染起就看不到,不会闪一下。
   body.mw-editable 由 MediaWiki 核心仅在有编辑权限的登录用户身上输出。 */
.card-edit {
	display: none;
	float: right;
	margin: 0 14px 0 0;
	font-size: 12px;
	font-weight: 400;
	letter-spacing: 0;
	line-height: 1.9;
}
body.mw-editable .card-edit {
	display: block;
}
.card-edit a {
	display: inline-block;
	padding: 0 9px;
	color: #ffffff !important;
	text-decoration: none;
	border: 1px solid rgba(255, 255, 255, 0.55);
	border-radius: 11px;
	background: rgba(255, 255, 255, 0.14);
}
.card-edit a.external {
	background-image: none !important;
	padding-right: 9px !important;
}
.card-edit a:hover {
	background: #ffffff;
	border-color: #ffffff;
	color: #510DAB !important;
}

/* 板块正文最小高度:内容为空时框不塌 */
.cb { min-height: 300px; }
.cb-tall { min-height: 380px; }

/* 两个编辑入口并存:「编辑」=可视化;「排版编辑」=源码+排版工具条 */
#ca-ve-edit ~ #ca-edit {
	display: inline-block !important;
}

/* 板块正文里的标题:去掉「[编辑]」小链接,字号收敛成清晰的三级层次 */
.cb .mw-editsection,
.cb-tall .mw-editsection { display: none !important; }

.cb .mw-heading,
.cb-tall .mw-heading { margin: 0.5em 0; }

.cb h1, .cb-tall h1 { font-size: 165%; }
.cb h2, .cb-tall h2 { font-size: 135%; }
.cb h3, .cb-tall h3 { font-size: 118%; }
.cb h4, .cb-tall h4 { font-size: 105%; }
.cb h1, .cb h2, .cb h3, .cb h4, .cb h5, .cb h6,
.cb-tall h1, .cb-tall h2, .cb-tall h3, .cb-tall h4, .cb-tall h5, .cb-tall h6 {
	border-bottom: none !important;
	margin: 0.35em 0;
	line-height: 1.45;
	color: #222222;
	font-weight: 700;
}

/* 新建页面入口:仅登录且有编辑权的管理员可见 */
body:not(.mw-editable) #n-创建新页面{display:none}
#n-创建新页面 a{font-weight:700}

/* ===== 排版工具条(源代码编辑器) =====
   工具条按钮由 MediaWiki:Common.js 注入,这里只管外观:
   让「颜色 / 字号 / 对齐 / 插图 / 调图」在灰色工具条里显眼一点。 */
#wikiEditor-ui-toolbar .group-layout .tool-select > .label {
	background: #6b3fa0;
	color: #ffffff !important;
	border-radius: 4px;
	padding: 2px 10px;
	margin: 2px 1px;
	font-weight: 700;
}
#wikiEditor-ui-toolbar .group-layout .tool-select > .label:hover {
	background: #8552c2;
}
#wikiEditor-ui-toolbar .group-layout .tool-button {
	font-weight: 700;
	color: #6b3fa0;
}
#wikiEditor-ui-toolbar .group-layout .tool-select .menu .option {
	padding: 4px 12px;
	white-space: nowrap;
}

/* 图片对话框里的「去上传」提示 */
.chenyue-img-hint {
	margin: 14px 0 0;
	font-size: 92%;
}
.chenyue-img-hint a {
	color: #6b3fa0;
	font-weight: 700;
}