MediaWiki:Common.css:修订间差异
删除的内容 添加的内容
无编辑摘要 |
CaelLab-import(留言 | 贡献) 补齐 Module:Infobox 使用的新类名(infobox-title/-above/-label/-data/-image/-full-data/-subheader/-below/-navbar)样式,样式块移植自 zh.wikipedia.org 的 Common.css(原先只给旧类名 infobox-header 写了样式) |
||
| (未显示3个用户的10个中间版本) | |||
第186行:
.documentation-missing .documentation-body {
color: #72777d;
}
#siteSub {
display: block !important;
margin-top: 0.2em;
color: #54595d;
}
/* ============================================
Message box 全局样式(对齐求闻百科)
使 #mw-clearyourcache 等非 .mw-parser-output 容器中的 mbox/fmbox 正常显示边框
============================================ */
.mbox {
box-sizing: border-box;
margin: 4px 24px;
border: 1px solid #c8ccd1;
border-left-width: 6px;
background-color: #f8f9fa;
color: #202122;
display: flex;
flex-direction: row;
align-items: center;
width: auto;
max-width: 100%;
}
.mbox-body {
display: flex;
flex-direction: row;
align-items: center;
width: 100%;
}
.mbox-text, .mbox-text {
border: none;
padding: 8px;
width: 100%;
flex: 1 1 auto;
line-height: 1.75;
font-size: 16px;
}
.mbox-image {
border: none;
padding: 8px 0 8px 8px;
text-align: center;
flex: 0 0 auto;
display: flex;
align-items: center;
justify-content: center;
}
.mbox-imageright {
border: none;
padding: 8px 8px 8px 0;
text-align: center;
flex: 0 0 auto;
display: flex;
align-items: center;
justify-content: center;
}
.mbox-empty-cell {
border: none;
padding: 0;
width: 1px;
}
.hide-when-compact {
display: inline;
}
.mbox {
background-color: #f8f9fa;
}
.mbox-speedy { background-color: #ffeeee; border-left-color: #bb2222; }
.mbox-delete { background-color: #f0f0d8; border-left-color: #aa9977; }
.mbox-content { background-color: #ffeedd; border-left-color: #f28500; }
.mbox-style { background-color: #ffffcc; border-left-color: #ffbb33; }
.mbox-move { background-color: #ffeeff; border-left-color: #9933cc; }
.mbox-protection { background-color: #eeeeee; border-left-color: #606060; }
.mbox-notice { background-color: #ddeeff; border-left-color: #3366cc; }
.mbox-license { background-color: #f7f8ff; border-left-color: #999999; }
.mbox-featured { background-color: #ffeecc; border-left-color: #cba135; }
.mbox-policy { background-color: #ccffcc; border-left-color: #118811; }
.mbox-guideline { background-color: #ddeeff; border-left-color: #3366cc; }
.mbox-rule { background-color: #ffffcc; border-left-color: #ffbb33; }
.mbox-draft { background-color: #eeeeee; border-left-color: #606060; }
.mbox-setindex { background-color: #fefefe; border-left-color: #999999; }
.mbox-disambig { background-color: #fefefe; border-left-color: #999999; }
.fmbox {
box-sizing: border-box;
margin: 4px 24px;
border: 1px solid #c8ccd1;
border-left-width: 6px;
background-color: #f8f9fa;
color: #202122;
display: flex;
flex-direction: row;
align-items: center;
width: auto;
max-width: 100%;
}
.fmbox-warning { border-left-color: #b32424; }
.fmbox-editnotice { border-left-color: #36c; }
.fmbox-system { border-left-color: #a2a9b1; }
.fmbox-copyright { border-left-color: #00803b; }
/* Ombox(表格型消息框,镜像 mbox 配色;供手写表格使用,如 Template:Protection_templates) */
table.ombox {
box-sizing: border-box;
margin: 4px 24px;
border: 1px solid #c8ccd1;
border-left-width: 6px;
background-color: #f8f9fa;
color: #202122;
border-collapse: separate;
}
table.ombox th,
table.ombox td {
padding: 4px 8px;
}
table.ombox.ombox-speedy { background-color: #ffeeee; border-left-color: #bb2222; }
table.ombox.ombox-delete { background-color: #f0f0d8; border-left-color: #aa9977; }
table.ombox.ombox-content { background-color: #ffeedd; border-left-color: #f28500; }
table.ombox.ombox-style { background-color: #ffffcc; border-left-color: #ffbb33; }
table.ombox.ombox-move { background-color: #ffeeff; border-left-color: #9933cc; }
table.ombox.ombox-protection { background-color: #eeeeee; border-left-color: #606060; }
table.ombox.ombox-notice { background-color: #ddeeff; border-left-color: #3366cc; }
table.ombox.ombox-license { background-color: #f7f8ff; border-left-color: #999999; }
table.ombox.ombox-featured { background-color: #ffeecc; border-left-color: #cba135; }
table.ombox.ombox-policy { background-color: #ccffcc; border-left-color: #118811; }
table.ombox.ombox-guideline { background-color: #ddeeff; border-left-color: #3366cc; }
table.ombox.ombox-rule { background-color: #ffffcc; border-left-color: #ffbb33; }
table.ombox.ombox-draft { background-color: #eeeeee; border-left-color: #606060; }
table.ombox.ombox-setindex { background-color: #fefefe; border-left-color: #999999; }
table.ombox.ombox-disambig { background-color: #fefefe; border-left-color: #999999; }
/* ============================================
全局字体
============================================ */
:root {
--fonts-sans: "-apple-system","BlinkMacSystemFont","Helvetica Neue","Source Sans Pro","Source Sans 3","DejaVu Sans","Liberation Sans","Helvetica","Roboto","Inter","Arial","SFProDisplay-Regular","PingFang SC","Source Han Sans SC","Noto Sans CJK SC","Microsoft YaHei","WenQuanYi Micro Hei","Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol",emoji,"NospzGothic","Arial Unicode MS","Plangothic P1","Plangothic P2","文泉驿等宽正黑","unifont",sans-serif;
}
body,
input,
textarea,
select,
button {
font-family: var(--fonts-sans);
}
/* ============================================
Cquote 修复:覆盖 Vector/VisualEditor 的 .mw-body blockquote 灰色左边框
============================================ */
.cquotenew,
.mw-body .cquotenew {
border: 0 !important;
}
/* Navbar 通用内联:非 Navbox 场景(如 Tnavbar-header 顶栏)查/论/编 横排 */
.navbar ul {
display: inline;
white-space: nowrap;
}
.navbar li {
display: inline;
word-spacing: -0.125em;
}
.hatnote {
font-size: small;
font-style: italic;
color: #555;
margin-bottom: 0.5em;
padding-left: 1.5em;
text-indent: -1.5em;
}
.hatnote::before {
content: "→ ";
color: #888;
}
/* ============================================
infobox 图片与描述文字对齐修复
============================================ */
/* 使信息框内缩略图图片不浮动、水平居中 */
.infobox figure[typeof~="mw:File/Thumb"],
.infobox figure[typeof~="mw:File/Frame"] {
float: none !important;
margin: 0 auto !important;
}
/* 使信息框图片行的描述文字水平居中,与图片对齐 */
.infobox td.infobox-data-without-label {
text-align: center;
}
/* === Infobox: standard module classes (ported from zh.wikipedia.org Common.css, 2026-10-14) === */
/* Module:Infobox emits infobox-title/-above/-label/-data/-image/-full-data/-subheader/-below/-navbar;
the local sheet only styled the old .infobox-header name, so those cells had no styling. */
.infobox-header,
.infobox-label,
.infobox-above,
.infobox-full-data,
.infobox-data,
.infobox-below,
.infobox-subheader,
.infobox-image,
.infobox-navbar,
/* Remove element selector when every .infobox thing is using the standard module/templates */
.infobox th,
.infobox td {
vertical-align: top;
}
.infobox-label,
.infobox-data,
/* Remove element selector when every .infobox thing is using the standard module/templates */
.infobox th,
.infobox td {
/* @noflip */
text-align: left;
}
/* Remove .infobox when element selectors above are removed */
.infobox .infobox-above,
.infobox .infobox-title,
/* Remove element selector when every .infobox thing is using the standard module/templates */
.infobox caption {
font-size: 125%;
font-weight: bold;
text-align: center;
}
.infobox-title,
/* Remove element selector when every .infobox thing is using the standard module/templates */
.infobox caption {
padding: 0.2em;
}
/* Remove .infobox when element selectors above are removed */
.infobox .infobox-header,
.infobox .infobox-subheader,
.infobox .infobox-image,
.infobox .infobox-full-data,
.infobox .infobox-below {
text-align: center;
}
/* Remove .infobox when element selectors above are removed */
.infobox .infobox-navbar {
/* @noflip */
text-align: right;
}
.infobox.bordered {
border-collapse: collapse;
}
.infobox.bordered td,
.infobox.bordered th {
border: 1px solid var(--border-color-base, #a2a9b1);
}
.infobox.bordered .borderless td,
.infobox.bordered .borderless th {
border: 0;
}
/* styles for bordered infobox with merged rows */
.infobox.bordered .mergedtoprow td,
.infobox.bordered .mergedtoprow th {
border: 0;
border-top: 1px solid var(--border-color-base, #a2a9b1);
border-right: 1px solid var(--border-color-base, #a2a9b1);
}
.infobox.bordered .mergedrow td,
.infobox.bordered .mergedrow th {
border: 0;
border-right: 1px solid var(--border-color-base, #a2a9b1);
}
| |||