MediaWiki:Common.css:修订间差异

来自尘月维基
跳转到导航 跳转到搜索
Admin​(留言 | 贡献)
无编辑摘要
Admin​(留言 | 贡献)
排版:放开源码编辑标签 + 工具条样式
 
(未显示同一用户的8个中间版本)
第1行: 第1行:
/* ===== 尘月维基 · 黑顶栏 / 白侧栏 / 白底 / 紫横幅 + 紫标题条(全部直角) ===== */
/* ===== 尘月维基 · Vector 经典皮肤(对齐参考站) =====
:root {
  参考站本身几乎没有自定义 CSS,外观全部由首页内联样式表格实现。
--wiki-purple: #6b3fa0;
  这里只做三件事:中文字体、站标尺寸、去点击虚线框。
--wiki-purple-deep: #5a2f8f;
*/
--wiki-border: #e0d5f0;
 
body {
font-family: -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}
}


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


/* 固定设计宽度 1120:电脑居中显示;手机由 viewport 固定宽度整页等比缩放,两端布局完全一致 */
/* 内容区最小高度,避免空页面太短 */
#mw-wrapper {
#content {
width: 1120px !important;
min-height: 60vh;
min-width: 1120px !important;
max-width: 1120px !important;
margin: 0 auto !important;
padding: 0 18px !important;
box-sizing: border-box !important;
}
}


/* 顶栏黑色 */
/* 首页板块表格里的图片不被撑破 */
#mw-header-container,
.mw-parser-output table img {
#mw-header,
max-width: 100%;
#mw-header-hack {
height: auto;
background: #141414 !important;
border-color: #141414 !important;
}
}
#mw-header a,
#mw-header-container a,
#mw-header-hack a,
#user-tools a,
#p-personal li a,
#mw-header .mw-logo-wordmark { color: #ffffff !important; }
#mw-header .mw-logo-tagline { color: #c9b8e6 !important; }
#searchInput { color: #fff !important; }


/* 左侧栏白色 */
/* 去掉链接点击后的虚线框 */
#mw-site-navigation,
a:focus {
#mw-related-navigation {
outline: none;
background: #ffffff !important;
border: none !important;
}
}


/* 侧栏顶部 logo(左上角图标):恢复显示 */
/* ===== 板块右上角「编辑内容」按钮 =====
#p-logo { display: block !important; margin: 0 0 14px 0 !important; }
  默认 display:none —— 匿名访客从首屏渲染起就看不到,不会闪一下。
#p-logo a {
  body.mw-editable 由 MediaWiki 核心仅在有编辑权限的登录用户身上输出。 */
display: block !important;
.card-edit {
width: 132px !important;
display: none;
height: 132px !important;
float: right;
background-size: contain !important;
margin: 0 14px 0 0;
background-repeat: no-repeat !important;
font-size: 12px;
background-position: left top !important;
font-weight: 400;
letter-spacing: 0;
line-height: 1.9;
}
}
#p-logo img {
body.mw-editable .card-edit {
display: block !important;
display: block;
max-width: 132px !important;
max-height: 132px !important;
width: auto !important;
height: auto !important;
}
}
 
.card-edit a {
/* ===== 顶栏左上角站点图标 ===== */
display: inline-block;
#p-logo-text a#p-banner,
padding: 0 9px;
#p-logo-text a.mw-wiki-title {
color: #ffffff !important;
display: inline-flex !important;
text-decoration: none;
align-items: center !important;
border: 1px solid rgba(255, 255, 255, 0.55);
gap: 10px !important;
border-radius: 11px;
background: rgba(255, 255, 255, 0.14);
}
.card-edit a.external {
background-image: none !important;
padding-right: 9px !important;
}
}
#p-logo-text a#p-banner::before,
.card-edit a:hover {
#p-logo-text a.mw-wiki-title::before {
background: #ffffff;
content: "" !important;
border-color: #ffffff;
display: block !important;
color: #510DAB !important;
flex: 0 0 auto !important;
width: 32px !important;
height: 32px !important;
border-radius: 7px !important;
background: #ffffff url(/logo.jpg) center center / cover no-repeat !important;
box-shadow: 0 0 0 1px rgba(255, 255, 255, .18) !important;
}
}


/* 隐藏分类行,保持页面干净 */
/* 板块正文最小高度:内容为空时框不塌 */
#mw-normal-catlinks { display: none !important; }
.cb { min-height: 300px; }
.cb-tall { min-height: 380px; }


/* 空工具箱块隐藏(p-tb 为空时留下的小空壳) */
/* 两个编辑入口并存:「编辑」=可视化;「排版编辑」=源码+排版工具条 */
#p-tb,
#ca-ve-edit ~ #ca-edit {
#site-tools { display: none !important; }
display: inline-block !important;
}


/* 页脚链接加深,避免淡到看不清 */
/* 板块正文里的标题:去掉「[编辑]」小链接,字号收敛成清晰的三级层次 */
#mw-footer a,
.cb .mw-editsection,
.mw-footer a { color: #6b3fa0 !important; }
.cb-tall .mw-editsection { display: none !important; }
#mw-footer,
.mw-footer { color: #777777 !important; }
#mw-site-navigation a,
#mw-related-navigation a { color: var(--wiki-purple) !important; }
#mw-site-navigation h3,
#mw-related-navigation h3 {
color: var(--wiki-purple-deep) !important;
border-bottom: 1px solid var(--wiki-border) !important;
}


/* 顶部欢迎横幅:紫色实色、圆角、柔和投影 */
.cb .mw-heading,
.site-banner {
.cb-tall .mw-heading { margin: 0.5em 0; }
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
background: var(--wiki-purple) !important;
color: #fff;
border-radius: 10px !important;
padding: 16px 22px;
margin-bottom: 16px;
box-shadow: 0 3px 12px rgba(90, 47, 143, 0.20);
}
.banner-text { flex: 1 1 auto; }
.banner-title { font-size: 24px; font-weight: 700; letter-spacing: 0; line-height: 1.3; }
.banner-sub { font-size: 13px; opacity: .95; margin-top: 6px; line-height: 1.6; }
.banner-logo {
flex: 0 0 auto;
width: 78px; height: 78px;
background-image: url(/logo.jpg);
background-size: contain;
background-repeat: no-repeat;
background-position: center;
border-radius: 0 !important;
}


/* 板块:白底 + 细边框 + 圆角 + 柔和阴影 */
.cb h1, .cb-tall h1 { font-size: 165%; }
.block {
.cb h2, .cb-tall h2 { font-size: 135%; }
background: #ffffff !important;
.cb h3, .cb-tall h3 { font-size: 118%; }
border: 1px solid var(--wiki-border) !important;
.cb h4, .cb-tall h4 { font-size: 105%; }
border-radius: 8px !important;
.cb h1, .cb h2, .cb h3, .cb h4, .cb h5, .cb h6,
overflow: hidden;
.cb-tall h1, .cb-tall h2, .cb-tall h3, .cb-tall h4, .cb-tall h5, .cb-tall h6 {
margin-bottom: 16px;
border-bottom: none !important;
box-shadow: 0 3px 10px rgba(80, 45, 135, 0.14);
margin: 0.35em 0;
line-height: 1.45;
color: #222222;
color: #222222;
}
/* 板块标题条:紫色、白字、居中、顶部圆角(页面上唯一带色的区块之一) */
.block-title {
background: var(--wiki-purple) !important;
color: #ffffff;
text-align: center;
font-size: 16px;
font-weight: 700;
font-weight: 700;
letter-spacing: 1px;
padding: 10px 0;
border-bottom: none;
border-radius: 7px 7px 0 0;
}
}


.block-body {
/* 新建页面入口:仅登录且有编辑权的管理员可见 */
padding: 16px 18px;
body:not(.mw-editable) #n-创建新页面{display:none}
line-height: 1.8;
#n-创建新页面 a{font-weight:700}
color: #333333;
background: #ffffff;
}


/* 两列并排:不做断点重排,手机端靠整页缩放保持同一布局 */
/* ===== 排版工具条(源代码编辑器) =====
.card-row {
  工具条按钮由 MediaWiki:Common.js 注入,这里只管外观:
display: grid;
  让「颜色 / 字号 / 对齐 / 插图 / 调图」在灰色工具条里显眼一点。 */
grid-template-columns: 1fr 1fr;
#wikiEditor-ui-toolbar .group-layout .tool-select > .label {
gap: 16px;
background: #6b3fa0;
margin-bottom: 16px;
color: #ffffff !important;
border-radius: 4px;
padding: 2px 10px;
margin: 2px 1px;
font-weight: 700;
}
}
.card-row .block { margin-bottom: 0; }
#wikiEditor-ui-toolbar .group-layout .tool-select > .label:hover {
 
background: #8552c2;
/* 隐藏「外观/参数设置」等默认菜单,无入口按钮 */
#pt-preferences,
#pt-watchlist,
#pt-mycontris,
#vector-appearance-pinned-container,
#vector-appearance-unpinned-container { display: none !important; }
 
/* 固定三栏布局:无视皮肤自身断点(851/1100/1340),手机缩放后与电脑完全一致 */
#mw-content-block {
display: flex !important;
align-items: flex-start !important;
clear: both !important;
max-width: none !important;
}
}
#mw-site-navigation {
#wikiEditor-ui-toolbar .group-layout .tool-button {
order: 1;
font-weight: 700;
flex: 0 0 186px !important;
color: #6b3fa0;
width: 186px !important;
position: static !important;
display: block !important;
margin: 0 !important;
padding: 14px 10px 14px 0 !important;
border-right: 1px solid var(--wiki-border);
}
}
#mw-content-wrapper {
#wikiEditor-ui-toolbar .group-layout .tool-select .menu .option {
order: 2;
padding: 4px 12px;
flex: 1 1 auto !important;
white-space: nowrap;
min-width: 0 !important;
}
}
/* 右侧栏(页面工具/更多)隐藏,与参考图一致:只有左栏 + 内容 */
#mw-related-navigation { display: none !important; }
#mw-content { margin-top: 0 !important; }


/* 侧栏内容常显,不被折叠成下拉 */
/* 图片对话框里的「去上传」提示 */
#mw-site-navigation .sidebar-inner,
.chenyue-img-hint {
#mw-related-navigation .sidebar-inner,
margin: 14px 0 0;
#mw-site-navigation .dropdown,
font-size: 92%;
#mw-related-navigation .dropdown {
display: block !important;
position: static !important;
box-shadow: none !important;
background: #ffffff !important;
padding: 0 !important;
margin: 0 !important;
max-width: none !important;
min-width: 0 !important;
overflow: visible !important;
}
}
 
.chenyue-img-hint a {
/* 隐藏折叠按钮、装饰彩条、页脚 MediaWiki 图标 */
color: #6b3fa0;
#mw-header-hack,
font-weight: 700;
#mw-header-nav-hack,
.color-bar,
.color-middle-container,
.color-left,
.color-middle,
.color-right,
#site-navigation h2,
#site-tools h2,
#user-tools h2,
#footer-icons { display: none !important; }
 
/* 页脚:仅一条浅灰分隔线,无彩色条 */
#mw-content-container { border-bottom: 0 !important; background: #ffffff !important; }
#mw-footer,
.mw-footer,
.mw-footer-container {
background: #ffffff !important;
border-top: 1px solid #eeeeee !important;
box-shadow: none !important;
}
#footer-poweredbyico { display: none !important; }
 
/* 页面大标题下划线改浅灰 */
#firstHeading,
h1.firstHeading {
border-bottom: 1px solid #e6e6e6 !important;
color: #222222 !important;
font-weight: 500 !important;
margin-bottom: 6px !important;
}
 
/* 左侧栏文字尺寸 */
#mw-site-navigation ul {
margin: 0 0 12px 0 !important;
padding-left: 0 !important;
list-style: none;
}
#mw-site-navigation li { font-size: 13px; line-height: 1.9; white-space: nowrap; }
#mw-site-navigation h3 { font-size: 13px; letter-spacing: 0; margin: 0 0 6px; padding-bottom: 4px; }
 
/* 隐藏页脚 MediaWiki 品牌 */
#footer-poweredby,
#f-poweredbyimg { display: none !important; }
 
/* 窄屏固定比例兜底:脚本未生效时也整页缩小 */
@media screen and (max-width: 900px) {
html { zoom: 0.32; }
}
@media screen and (max-width: 480px) {
html { zoom: 0.30; }
}
}

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;
}