MediaWiki:Common.css:修订间差异
外观
imported>Soleverlee 无编辑摘要 |
小无编辑摘要 |
||
| (未显示2个用户的38个中间版本) | |||
| 第1行: | 第1行: | ||
/* ========================================================= | |||
MediaWiki 现代阅读风 Common.css | |||
正文无衬线 / 标题加粗无衬线 / 代码等宽 / UI 轻量化 | |||
========================================================= */ | |||
/* ---------- 全局基础 ---------- */ | |||
font-family: | html, body { | ||
font-family: "Inter", "HarmonyOS Sans SC", "Noto Sans SC", | |||
"PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", | |||
system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; | |||
font-size: 16.5px; | |||
line-height: 1.7; | |||
color: #1f2328; /* 接近 GitHub 正文色,比纯黑柔和 */ | |||
-webkit-font-smoothing: antialiased; | |||
text-rendering: optimizeLegibility; | |||
} | } | ||
/* ---------- 标题:现代无衬线,字重分层 ---------- */ | |||
font-family: | h1, h2, h3, h4, h5, h6 { | ||
font-family: "Inter", "HarmonyOS Sans SC", "Noto Sans SC", | |||
"PingFang SC", "Microsoft YaHei", system-ui, sans-serif; | |||
font-weight: 650; | |||
line-height: 1.35; | |||
color: #111418; | |||
letter-spacing: -0.01em; /* 大标题稍微收紧,更现代 */ | |||
} | } | ||
h1 { font-size: 1.9em; font-weight: 700; } | |||
h2 { | |||
font-size: 1.5em; | |||
border-bottom: 1px solid #e6e8eb; /* 细线分隔,不重 */ | |||
padding-bottom: 0.25em; | |||
} | } | ||
h3 { font-size: 1.25em; } | |||
h4 { font-size: 1.08em; } | |||
/* ---------- 正文段落间距优化 ---------- */ | |||
p { margin: 0.75em 0; } | |||
} | li { line-height: 1.65; } | ||
/* ---------- 链接:现代蓝,去下划线 hover 显示 ---------- */ | |||
a { | |||
color: #2563eb; | |||
text-decoration: none; | |||
} | } | ||
a:hover { | |||
color: #1d4ed8; | |||
text-decoration: underline; | |||
text-underline-offset: 2px; | |||
color: # | |||
text- | |||
} | } | ||
a:visited { color: #7c3aed; } | |||
. | /* ---------- 代码块:等宽,深色底浅字 ---------- */ | ||
code, pre, .mw-code, .mw-highlight pre, .syntaxhighlight { | |||
font-family: "JetBrains Mono", "Fira Code", "Cascadia Code", | |||
"Consolas", "Monaco", "Menlo", monospace; | |||
font-size: 0.88em; | |||
border-radius: 6px; | |||
} | } | ||
code { | |||
. | background: #f3f4f6; | ||
color: | padding: 0.15em 0.4em; | ||
color: #db2777; /* 行内代码粉紫,辨识度高 */ | |||
} | } | ||
pre, .mw-code { | |||
background: #0f172a; /* 深蓝灰底 */ | |||
background: | color: #e2e8f0; | ||
padding: 0.9em 1.1em; | |||
overflow-x: auto; | |||
color: # | border: 1px solid #1e293b; | ||
} | } | ||
pre code { background: none; color: inherit; padding: 0; } | |||
# | /* ---------- UI 区域:导航/侧边栏更轻 ---------- */ | ||
#mw-panel, #p-personal, #left-navigation, #right-navigation, | |||
.vector-menu, .mw-ui-button, .mw-ui-input, | |||
.skin-vector-2022 .vector-menu-tabs, | |||
.skin-timeless .portlet { | |||
font-family: "Inter", "Noto Sans SC", "PingFang SC", | |||
"Microsoft YaHei", system-ui, sans-serif; | |||
font-size: 14px; | |||
font-weight: 500; | |||
color: #374151; | |||
} | } | ||
/* 侧边栏标题弱化 */ | |||
.vector-menu-portal h3, | |||
#mw-panel .portal h3 { | |||
font-size: 12px; | |||
text-transform: uppercase; | |||
letter-spacing: 0.06em; | |||
color: #9ca3af; | |||
font-weight: 600; | |||
} | } | ||
/* ---------- 引用块:现代卡片感 ---------- */ | |||
font-family: | blockquote { | ||
font-family: inherit; /* 跟正文同族,不再斜体衬线 */ | |||
font-style: normal; | |||
border-left: 3px solid #3b82f6; | |||
background: #f8fafc; | |||
color: #334155; | |||
padding: 0.6em 1em; | |||
margin: 1em 0; | |||
border-radius: 0 6px 6px 0; | |||
} | } | ||
. | /* ---------- 表格:去厚重边框 ---------- */ | ||
table.wikitable { | |||
border-collapse: collapse; | |||
font-size: 0.95em; | |||
} | } | ||
table.wikitable > * > tr > th { | |||
background: #f8fafc; | |||
border: 1px solid #e5e7eb; | |||
padding: 0.5em 0.75em; | |||
font-weight: 600; | |||
} | } | ||
table.wikitable > * > tr > td { | |||
border: 1px solid #eef0f2; | |||
padding: 0.5em 0.75em; | |||
} | } | ||
/* ---------- 数学公式对齐 ---------- */ | |||
.mwe-math-element { | |||
font-size: 1.02em; | |||
vertical-align: middle; | |||
} | } | ||
/* ---------- Minerva 移动端兜底(避免被移动皮肤覆盖回衬线) ---------- */ | |||
.skin-minerva body, | |||
.skin-minerva .content { | |||
font-family: "Inter", "Noto Sans SC", "PingFang SC", | |||
"HarmonyOS Sans SC", system-ui, sans-serif !important; | |||
line-height: 1.7; | |||
} | |||
.skin-minerva h1, .skin-minerva h2, .skin-minerva h3 { | |||
font-family: inherit !important; | |||
letter-spacing: -0.01em; | |||
} | } | ||
/* ---------- 暗色模式友好(Vector2022 暗色时) ---------- */ | |||
border- | @media (prefers-color-scheme: dark) { | ||
html, body { color: #e6edf3; } | |||
border-color: # | h1, h2, h3, h4, h5, h6 { color: #f0f6fc; } | ||
h2 { border-bottom-color: #30363d; } | |||
a { color: #58a6ff; } | |||
a:visited { color: #bc8cff; } | |||
code { background: #21262d; color: #ff7b72; } | |||
blockquote { background: #161b22; color: #adbac7; border-left-color: #58a6ff; } | |||
table.wikitable > * > tr > th { background: #161b22; } | |||
} | } | ||
2026年10月3日 (六) 03:26的最新版本
/* =========================================================
MediaWiki 现代阅读风 Common.css
正文无衬线 / 标题加粗无衬线 / 代码等宽 / UI 轻量化
========================================================= */
/* ---------- 全局基础 ---------- */
html, body {
font-family: "Inter", "HarmonyOS Sans SC", "Noto Sans SC",
"PingFang SC", "Microsoft YaHei", "Hiragino Sans GB",
system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
font-size: 16.5px;
line-height: 1.7;
color: #1f2328; /* 接近 GitHub 正文色,比纯黑柔和 */
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
}
/* ---------- 标题:现代无衬线,字重分层 ---------- */
h1, h2, h3, h4, h5, h6 {
font-family: "Inter", "HarmonyOS Sans SC", "Noto Sans SC",
"PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
font-weight: 650;
line-height: 1.35;
color: #111418;
letter-spacing: -0.01em; /* 大标题稍微收紧,更现代 */
}
h1 { font-size: 1.9em; font-weight: 700; }
h2 {
font-size: 1.5em;
border-bottom: 1px solid #e6e8eb; /* 细线分隔,不重 */
padding-bottom: 0.25em;
}
h3 { font-size: 1.25em; }
h4 { font-size: 1.08em; }
/* ---------- 正文段落间距优化 ---------- */
p { margin: 0.75em 0; }
li { line-height: 1.65; }
/* ---------- 链接:现代蓝,去下划线 hover 显示 ---------- */
a {
color: #2563eb;
text-decoration: none;
}
a:hover {
color: #1d4ed8;
text-decoration: underline;
text-underline-offset: 2px;
}
a:visited { color: #7c3aed; }
/* ---------- 代码块:等宽,深色底浅字 ---------- */
code, pre, .mw-code, .mw-highlight pre, .syntaxhighlight {
font-family: "JetBrains Mono", "Fira Code", "Cascadia Code",
"Consolas", "Monaco", "Menlo", monospace;
font-size: 0.88em;
border-radius: 6px;
}
code {
background: #f3f4f6;
padding: 0.15em 0.4em;
color: #db2777; /* 行内代码粉紫,辨识度高 */
}
pre, .mw-code {
background: #0f172a; /* 深蓝灰底 */
color: #e2e8f0;
padding: 0.9em 1.1em;
overflow-x: auto;
border: 1px solid #1e293b;
}
pre code { background: none; color: inherit; padding: 0; }
/* ---------- UI 区域:导航/侧边栏更轻 ---------- */
#mw-panel, #p-personal, #left-navigation, #right-navigation,
.vector-menu, .mw-ui-button, .mw-ui-input,
.skin-vector-2022 .vector-menu-tabs,
.skin-timeless .portlet {
font-family: "Inter", "Noto Sans SC", "PingFang SC",
"Microsoft YaHei", system-ui, sans-serif;
font-size: 14px;
font-weight: 500;
color: #374151;
}
/* 侧边栏标题弱化 */
.vector-menu-portal h3,
#mw-panel .portal h3 {
font-size: 12px;
text-transform: uppercase;
letter-spacing: 0.06em;
color: #9ca3af;
font-weight: 600;
}
/* ---------- 引用块:现代卡片感 ---------- */
blockquote {
font-family: inherit; /* 跟正文同族,不再斜体衬线 */
font-style: normal;
border-left: 3px solid #3b82f6;
background: #f8fafc;
color: #334155;
padding: 0.6em 1em;
margin: 1em 0;
border-radius: 0 6px 6px 0;
}
/* ---------- 表格:去厚重边框 ---------- */
table.wikitable {
border-collapse: collapse;
font-size: 0.95em;
}
table.wikitable > * > tr > th {
background: #f8fafc;
border: 1px solid #e5e7eb;
padding: 0.5em 0.75em;
font-weight: 600;
}
table.wikitable > * > tr > td {
border: 1px solid #eef0f2;
padding: 0.5em 0.75em;
}
/* ---------- 数学公式对齐 ---------- */
.mwe-math-element {
font-size: 1.02em;
vertical-align: middle;
}
/* ---------- Minerva 移动端兜底(避免被移动皮肤覆盖回衬线) ---------- */
.skin-minerva body,
.skin-minerva .content {
font-family: "Inter", "Noto Sans SC", "PingFang SC",
"HarmonyOS Sans SC", system-ui, sans-serif !important;
line-height: 1.7;
}
.skin-minerva h1, .skin-minerva h2, .skin-minerva h3 {
font-family: inherit !important;
letter-spacing: -0.01em;
}
/* ---------- 暗色模式友好(Vector2022 暗色时) ---------- */
@media (prefers-color-scheme: dark) {
html, body { color: #e6edf3; }
h1, h2, h3, h4, h5, h6 { color: #f0f6fc; }
h2 { border-bottom-color: #30363d; }
a { color: #58a6ff; }
a:visited { color: #bc8cff; }
code { background: #21262d; color: #ff7b72; }
blockquote { background: #161b22; color: #adbac7; border-left-color: #58a6ff; }
table.wikitable > * > tr > th { background: #161b22; }
}