MediaWiki:Minerva.css: Difference between revisions
Jump to navigation
Jump to search
Chinaenglish (talk | contribs) No edit summary |
Chinaenglish (talk | contribs) No edit summary |
||
| Line 37: | Line 37: | ||
} | } | ||
/*viesz88结束端*/ | /*viesz88结束端*/ | ||
/* ============================================================ | /* ============================================================ | ||
Mobile Minerva — Modern Editorial | |||
内容区左右留白 1mm;可读性内边距放在分区/列表内部 | |||
============================================================ */ | ============================================================ */ | ||
:root { | :root { | ||
--brand: #2a6ebb; /* ← 改成你的品牌色 */ | |||
-- | --brand-soft: rgba(42, 110, 187, 0.08); | ||
--ink: #111111; | |||
-- | --ink-2: #555b63; | ||
-- | --line: #e6e8eb; | ||
-- | --surface: #f5f7fa; | ||
--white: #ffffff; | |||
--radius: 10px; | |||
-- | |||
-- | |||
-- | |||
} | } | ||
/* ---------- | /* ---------- 画布 ---------- */ | ||
html, | |||
body { | body { | ||
background: var(-- | background: var(--white) !important; | ||
color: var(-- | color: var(--ink); | ||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, | |||
"Helvetica Neue", Arial, sans-serif; | |||
font-size: 16px; | font-size: 16px; | ||
line-height: 1. | line-height: 1.68; | ||
-webkit-font-smoothing: antialiased; | -webkit-font-smoothing: antialiased; | ||
text-rendering: optimizeLegibility; | text-rendering: optimizeLegibility; | ||
} | |||
/* ---------- 左右留白 1mm(核心) ---------- */ | |||
.mw-body, | |||
.mw-body-content, | |||
#mw-content-text, | |||
.content, | |||
.page-content, | |||
#content { | |||
padding-left: 1mm !important; | |||
padding-right: 1mm !important; | |||
margin-left: 0 !important; | |||
margin-right: 0 !important; | |||
max-width: 100% !important; | |||
box-sizing: border-box !important; | |||
} | } | ||
.mw-body-content { | .mw-body-content { | ||
background: var(--white) !important; | |||
overflow-wrap: break-word; | |||
padding-top: 10px !important; | |||
padding-bottom: 32px !important; | |||
} | } | ||
/* ---------- | /* ---------- 主标题:品牌色短横线做锚点,不用竖线 ---------- */ | ||
.mw-body-content h1.firstHeading { | .mw-body-content h1.firstHeading { | ||
position: relative; | |||
font-size: 1.55rem; | font-size: 1.55rem; | ||
font-weight: | font-weight: 750; | ||
letter-spacing: -0.02em; | |||
line-height: 1.25; | |||
margin: 4px 0 18px; | |||
padding: 12px 0 0; | |||
border: none; | |||
color: var(--ink); | |||
} | |||
.mw-body-content h1.firstHeading::before { | |||
content: ""; | |||
position: absolute; | |||
top: 0; | |||
left: 0; | |||
width: 34px; | |||
height: 4px; | |||
border-radius: 2px; | |||
background: var(--brand); | |||
} | |||
/* ---------- 分区标题:全宽浅灰带,去掉左竖线 ---------- */ | |||
.mw-body-content h2 { | |||
font-size: 1.12rem; | |||
font-weight: 700; | |||
letter-spacing: -0.01em; | letter-spacing: -0.01em; | ||
margin: | margin: 28px 0 10px; | ||
padding- | padding: 9px 12px; | ||
border- | background: var(--surface); | ||
border: none; | |||
border-radius: 8px; | |||
color: var(--ink); | |||
} | |||
.mw-body-content h3 { | |||
font-size: 1rem; | |||
font-weight: 700; | |||
margin: 20px 0 8px; | |||
color: var(--ink); | |||
} | } | ||
/* | /* ---------- 正文 ---------- */ | ||
.mw-body-content | .mw-body-content p { | ||
margin: 10px 0; | |||
color: var(--ink); | |||
margin: | |||
} | } | ||
.mw-body-content strong, | |||
.mw-body-content b { | |||
font-weight: 700; | |||
} | |||
/* | /* ---------- 列表:细线分隔,不做浮动卡片 ---------- */ | ||
.mw-body-content ul, | .mw-body-content ul, | ||
.mw-body-content | .mw-body-content ol { | ||
margin: 10px 0; | |||
padding: 0; | |||
padding: | |||
list-style: none; | list-style: none; | ||
border-top: 1px solid var(--line); | |||
} | |||
.mw-body-content ul li, | |||
.mw-body-content ol li { | |||
padding: 11px 2px; | |||
border-bottom: 1px solid var(--line); | |||
line-height: 1.58; | |||
} | } | ||
.mw-body-content ul li | .mw-body-content ul li::marker, | ||
.mw-body-content ol li::marker { | |||
color: var(--brand); | |||
} | } | ||
.mw-body-content ul | |||
/* 如果保留默认项目符号的页面,给一点左侧空间 */ | |||
.mw-body-content .mw-parser-output > ul:not(:empty) { | |||
padding-left: 0; | |||
} | } | ||
/* ---------- | /* ---------- 链接:品牌色是唯一有颜色的文本 ---------- */ | ||
.mw-body-content a { | .mw-body-content a { | ||
color: var(--brand | color: var(--brand); | ||
text-decoration: none; | text-decoration: none; | ||
font-weight: | font-weight: 550; | ||
-webkit-tap-highlight-color: transparent; | -webkit-tap-highlight-color: transparent; | ||
} | } | ||
.mw-body-content a:active { | .mw-body-content a:active { | ||
opacity: 0. | opacity: 0.6; | ||
} | } | ||
.mw-body-content a:visited { | .mw-body-content a:visited { | ||
color: var(--brand | color: var(--brand); | ||
opacity: 0. | opacity: 0.82; | ||
} | } | ||
/* ---------- 按钮 | /* ---------- 按钮 ---------- */ | ||
.mw-body-content .mw-ui-button, | .mw-body-content .mw-ui-button, | ||
.mw-body-content button, | .mw-body-content button, | ||
| Line 144: | Line 193: | ||
min-height: 44px; | min-height: 44px; | ||
border-radius: 8px; | border-radius: 8px; | ||
border: none; | border: none; | ||
background: var(--brand | background: var(--brand); | ||
color: # | color: #fff; | ||
padding: 0 | font-weight: 650; | ||
padding: 0 18px; | |||
} | } | ||
.mw-body-content .mw-ui-button.mw-ui-quiet, | .mw-body-content .mw-ui-button.mw-ui-quiet, | ||
.mw-body-content .mw-ui-button.mw-ui-progressive { | .mw-body-content .mw-ui-button.mw-ui-progressive { | ||
background: transparent; | background: transparent; | ||
color: var(--brand | color: var(--brand); | ||
border: 1.5px solid var(--brand- | border: 1.5px solid var(--brand); | ||
} | |||
/* ---------- 引用 / 代码 ---------- */ | |||
.mw-body-content blockquote { | |||
margin: 14px 0; | |||
padding: 10px 12px; | |||
border-left: 3px solid var(--brand); | |||
background: var(--brand-soft); | |||
border-radius: 0 8px 8px 0; | |||
color: var(--ink-2); | |||
} | |||
.mw-body-content pre, | |||
.mw-body-content code { | |||
background: var(--surface); | |||
border-radius: 6px; | |||
color: var(--ink); | |||
} | |||
.mw-body-content pre { | |||
padding: 12px; | |||
overflow-x: auto; | |||
} | } | ||
/* ---------- | /* ---------- 图片 / 表格 ---------- */ | ||
.mw-body-content img { | .mw-body-content img { | ||
max-width: 100%; | max-width: 100%; | ||
| Line 166: | Line 236: | ||
} | } | ||
.mw-body-content table { | |||
display: block; | |||
width: 100%; | |||
overflow-x: auto; | |||
.mw-body { | border-collapse: collapse; | ||
} | } | ||
.mw-body-content th, | |||
.mw-body, | .mw-body-content td { | ||
.mw-body-content | border-bottom: 1px solid var(--line); | ||
padding: 8px 6px; | |||
text-align: left; | |||
} | } | ||
/* | /* ---------- 小屏也保持 1mm ---------- */ | ||
@media (max-width: 480px) { | @media (max-width: 480px) { | ||
.mw-body, | .mw-body, | ||
| Line 213: | Line 258: | ||
.page-content, | .page-content, | ||
#content { | #content { | ||
padding-left: | padding-left: 1mm !important; | ||
padding-right: | padding-right: 1mm !important; | ||
} | |||
.mw-body-content h1.firstHeading { | |||
font-size: 1.42rem; | |||
} | |||
.mw-body-content h2 { | |||
margin-top: 24px; | |||
} | } | ||
} | } | ||
Revision as of 09:30, 5 November 2026
/* All CSS here will be loaded for users of the MinervaNeue skin */
/*vies130开始端*/
/* 首页横幅:贴边填满,去掉四周空白 这个viesz1和下面viesz2是一起的,都是解决增加首页横幅的*/
body.page-Main_Page .mw-page-title-main {
display: block !important;
color: transparent !important; /* 关键修改:让标题文字Main Page透明,但保留元素和背景 */
height: 120px;
margin: 0 -16px; /* 左右贴边:抵消内容区左右 padding,-16px 为示例值 */
padding: 0;
background-image: url("//www.chinaenglish.com/images/HomeBanner.png");
background-size: cover; /* 关键:填满整个区域,不再留白 */
background-repeat: no-repeat;
background-position: center;
}
/* 重置标题上层容器的顶部间距,消除图片上方空白,让首页横幅紧靠菜单栏-viesz2 */
body.page-Main_Page .mw-body,
body.page-Main_Page .heading-holder,
body.page-Main_Page .page-heading {
padding-top: 0 !important;
margin-top: 0 !important;
}
/*vies130结束端*/
/*viesz88开始端,配合修改移动端左上角边菜单的代码*/
/* 隐藏自定义菜单项的图标占位符,并调整左侧内边距 */
#mw-mf-page-left .custom-custom-menu-item::before {
display: none !important;
}
#mw-mf-page-left .custom-custom-menu-item {
/* 因为没了图标,把左侧的 padding 调小一点,文字就不会显得太靠右 */
padding-left: 16px !important;
}
/*viesz88结束端*/
/* ============================================================
Mobile Minerva — Modern Editorial
内容区左右留白 1mm;可读性内边距放在分区/列表内部
============================================================ */
:root {
--brand: #2a6ebb; /* ← 改成你的品牌色 */
--brand-soft: rgba(42, 110, 187, 0.08);
--ink: #111111;
--ink-2: #555b63;
--line: #e6e8eb;
--surface: #f5f7fa;
--white: #ffffff;
--radius: 10px;
}
/* ---------- 画布 ---------- */
html,
body {
background: var(--white) !important;
color: var(--ink);
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
"Helvetica Neue", Arial, sans-serif;
font-size: 16px;
line-height: 1.68;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
}
/* ---------- 左右留白 1mm(核心) ---------- */
.mw-body,
.mw-body-content,
#mw-content-text,
.content,
.page-content,
#content {
padding-left: 1mm !important;
padding-right: 1mm !important;
margin-left: 0 !important;
margin-right: 0 !important;
max-width: 100% !important;
box-sizing: border-box !important;
}
.mw-body-content {
background: var(--white) !important;
overflow-wrap: break-word;
padding-top: 10px !important;
padding-bottom: 32px !important;
}
/* ---------- 主标题:品牌色短横线做锚点,不用竖线 ---------- */
.mw-body-content h1.firstHeading {
position: relative;
font-size: 1.55rem;
font-weight: 750;
letter-spacing: -0.02em;
line-height: 1.25;
margin: 4px 0 18px;
padding: 12px 0 0;
border: none;
color: var(--ink);
}
.mw-body-content h1.firstHeading::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 34px;
height: 4px;
border-radius: 2px;
background: var(--brand);
}
/* ---------- 分区标题:全宽浅灰带,去掉左竖线 ---------- */
.mw-body-content h2 {
font-size: 1.12rem;
font-weight: 700;
letter-spacing: -0.01em;
margin: 28px 0 10px;
padding: 9px 12px;
background: var(--surface);
border: none;
border-radius: 8px;
color: var(--ink);
}
.mw-body-content h3 {
font-size: 1rem;
font-weight: 700;
margin: 20px 0 8px;
color: var(--ink);
}
/* ---------- 正文 ---------- */
.mw-body-content p {
margin: 10px 0;
color: var(--ink);
}
.mw-body-content strong,
.mw-body-content b {
font-weight: 700;
}
/* ---------- 列表:细线分隔,不做浮动卡片 ---------- */
.mw-body-content ul,
.mw-body-content ol {
margin: 10px 0;
padding: 0;
list-style: none;
border-top: 1px solid var(--line);
}
.mw-body-content ul li,
.mw-body-content ol li {
padding: 11px 2px;
border-bottom: 1px solid var(--line);
line-height: 1.58;
}
.mw-body-content ul li::marker,
.mw-body-content ol li::marker {
color: var(--brand);
}
/* 如果保留默认项目符号的页面,给一点左侧空间 */
.mw-body-content .mw-parser-output > ul:not(:empty) {
padding-left: 0;
}
/* ---------- 链接:品牌色是唯一有颜色的文本 ---------- */
.mw-body-content a {
color: var(--brand);
text-decoration: none;
font-weight: 550;
-webkit-tap-highlight-color: transparent;
}
.mw-body-content a:active {
opacity: 0.6;
}
.mw-body-content a:visited {
color: var(--brand);
opacity: 0.82;
}
/* ---------- 按钮 ---------- */
.mw-body-content .mw-ui-button,
.mw-body-content button,
.mw-body-content input[type="submit"] {
min-height: 44px;
border-radius: 8px;
border: none;
background: var(--brand);
color: #fff;
font-weight: 650;
padding: 0 18px;
}
.mw-body-content .mw-ui-button.mw-ui-quiet,
.mw-body-content .mw-ui-button.mw-ui-progressive {
background: transparent;
color: var(--brand);
border: 1.5px solid var(--brand);
}
/* ---------- 引用 / 代码 ---------- */
.mw-body-content blockquote {
margin: 14px 0;
padding: 10px 12px;
border-left: 3px solid var(--brand);
background: var(--brand-soft);
border-radius: 0 8px 8px 0;
color: var(--ink-2);
}
.mw-body-content pre,
.mw-body-content code {
background: var(--surface);
border-radius: 6px;
color: var(--ink);
}
.mw-body-content pre {
padding: 12px;
overflow-x: auto;
}
/* ---------- 图片 / 表格 ---------- */
.mw-body-content img {
max-width: 100%;
height: auto;
border-radius: 8px;
}
.mw-body-content table {
display: block;
width: 100%;
overflow-x: auto;
border-collapse: collapse;
}
.mw-body-content th,
.mw-body-content td {
border-bottom: 1px solid var(--line);
padding: 8px 6px;
text-align: left;
}
/* ---------- 小屏也保持 1mm ---------- */
@media (max-width: 480px) {
.mw-body,
.mw-body-content,
#mw-content-text,
.content,
.page-content,
#content {
padding-left: 1mm !important;
padding-right: 1mm !important;
}
.mw-body-content h1.firstHeading {
font-size: 1.42rem;
}
.mw-body-content h2 {
margin-top: 24px;
}
}