跳转到内容

欢迎来到Riguz的小站!这是一个私人wiki,用来记录一些我的笔记。

MediaWiki:Common.css:修订间差异

来自WHY42
Riguz​(留言 | 贡献)
小无编辑摘要
标签:手工回退
Riguz​(留言 | 贡献)
小无编辑摘要
 
第1行: 第1行:
/* MediaWiki:Common.css */
/* =========================================================
  MediaWiki 现代阅读风 Common.css
  正文无衬线 / 标题加粗无衬线 / 代码等宽 / UI 轻量化
  ========================================================= */


/* ---------- 全局基础 ---------- */
html, body {
html, body {
     font-family: "Times New Roman", "SimSun", "STSong",  
     font-family: "Inter", "HarmonyOS Sans SC", "Noto Sans SC",
                 "Source Han Serif CN", "Noto Serif CJK SC", serif;
                 "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB",
     font-size: 17px;
                system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
     line-height: 1.75;
     font-size: 16.5px;
     line-height: 1.7;
    color: #1f2328;              /* 接近 GitHub 正文色,比纯黑柔和 */
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
}


/* 标题用稍粗的衬线,更有分量感 */
/* ---------- 标题:现代无衬线,字重分层 ---------- */
h1, h2, h3, h4, h5, h6 {
h1, h2, h3, h4, h5, h6 {
     font-family: "Cambria", "Georgia", "Times New Roman",  
     font-family: "Inter", "HarmonyOS Sans SC", "Noto Sans SC",
                 "Source Han Serif CN", "Noto Serif CJK SC",  
                 "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
                "SimSun", serif;
     font-weight: 650;
     font-weight: 600;
     line-height: 1.35;
     line-height: 1.3;
    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 {
code, pre, .mw-code, .mw-highlight pre, .syntaxhighlight {
     font-family: "JetBrains Mono", "Fira Code", "Consolas",  
     font-family: "JetBrains Mono", "Fira Code", "Cascadia Code",
                 "Monaco", "Menlo", "Liberation Mono", monospace;
                 "Consolas", "Monaco", "Menlo", monospace;
     font-size: 0.9em;
     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 元素用无衬线,区分内容区 */
/* ---------- UI 区域:导航/侧边栏更轻 ---------- */
#mw-panel, #p-personal, #left-navigation, #right-navigation,
#mw-panel, #p-personal, #left-navigation, #right-navigation,
.vector-menu, .mw-ui-button, .mw-ui-input {
.vector-menu, .mw-ui-button, .mw-ui-input,
     font-family: "Inter", "Segoe UI", "Noto Sans SC",  
.skin-vector-2022 .vector-menu-tabs,
                 "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
.skin-timeless .portlet {
     font-family: "Inter", "Noto Sans SC", "PingFang SC",
                 "Microsoft YaHei", system-ui, sans-serif;
     font-size: 14px;
     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 {
blockquote {
     font-family: "Georgia", "Cambria", "Source Han Serif CN", serif;
     font-family: inherit;       /* 跟正文同族,不再斜体衬线 */
     font-style: italic;
     font-style: normal;
     border-left: 3px solid #8b7355; /* 铜褐色,有年代感 */
     border-left: 3px solid #3b82f6;
     background: #faf8f3;
     background: #f8fafc;
     padding: 0.5em 1em;
    color: #334155;
     padding: 0.6em 1em;
     margin: 1em 0;
     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 {
.mwe-math-element {
     font-size: 1.05em;
     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; }
}
}

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