跳转到内容

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

MediaWiki:Common.css:修订间差异

来自WHY42
Riguz​(留言 | 贡献)
小无编辑摘要
Riguz​(留言 | 贡献)
小无编辑摘要
 
(未显示同一用户的1个中间版本)
第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; }
code, pre, .mw-code, .mw-highlight pre {
h2 {
     font-family: "JetBrains Mono", "Fira Code", "Consolas",
     font-size: 1.5em;
                "Monaco", "Menlo", "Liberation Mono", monospace;
    border-bottom: 1px solid #e6e8eb; /* 细线分隔,不重 */
     font-size: 0.9em;
     padding-bottom: 0.25em;
}
}
h3 { font-size: 1.25em; }
h4 { font-size: 1.08em; }


/* 侧边栏、导航等 UI 元素用无衬线,区分内容区 */
/* ---------- 正文段落间距优化 ---------- */
#mw-panel, #p-personal, #left-navigation, #right-navigation,
p { margin: 0.75em 0; }
.vector-menu, .mw-ui-button, .mw-ui-input {
li { line-height: 1.65; }
    font-family: "Inter", "Segoe UI", "Noto Sans SC",
                "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 14px;
}


/* 引用块:更复古的视觉 */
/* ---------- 链接:现代蓝,去下划线 hover 显示 ---------- */
blockquote {
a {
    font-family: "Georgia", "Cambria", "Source Han Serif CN", serif;
     color: #2563eb;
    font-style: italic;
     text-decoration: none;
    border-left: 3px solid #8b7355;  /* 铜褐色,有年代感 */
     background: #faf8f3;
     padding: 0.5em 1em;
    margin: 1em 0;
}
}
 
a:hover {
/* 数学公式周围的文字字号微调,让公式和正文更协调 */
    color: #1d4ed8;
.mwe-math-element {
    text-decoration: underline;
     font-size: 1.05em;
     text-underline-offset: 2px;
}
}
a:visited { color: #7c3aed; }


 
/* ---------- 代码块:等宽,深色底浅字 ---------- */
/* -------- for main page -- */
code, pre, .mw-code, .mw-highlight pre, .syntaxhighlight {
 
     font-family: "JetBrains Mono", "Fira Code", "Cascadia Code",
/* ============================================
                "Consolas", "Monaco", "Menlo", monospace;
  首页样式 - Main Page
     font-size: 0.88em;
  ============================================ */
     border-radius: 6px;
 
/* 首页容器 */
.main-page-container {
    max-width: 1200px;
    margin: 0 auto;
}
 
/* Hero 区 */
.hero-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    padding: 2.5rem 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    text-align: center;
}
.hero-title {
     font-size: 1.8rem;
     font-weight: 600;
    margin-bottom: 0.5rem;
     letter-spacing: 0.5px;
}
}
.hero-subtitle {
code {
     font-size: 1rem;
     background: #f3f4f6;
     opacity: 0.85;
     padding: 0.15em 0.4em;
     margin-bottom: 1.5rem;
     color: #db2777;             /* 行内代码粉紫,辨识度高 */
}
}
.hero-stats {
pre, .mw-code {
     display: flex;
     background: #0f172a;         /* 深蓝灰底 */
     justify-content: center;
     color: #e2e8f0;
     gap: 1.5rem;
     padding: 0.9em 1.1em;
     flex-wrap: wrap;
     overflow-x: auto;
    font-size: 0.95rem;
     border: 1px solid #1e293b;
}
.hero-stat {
    background: rgba(255,255,255,0.1);
    padding: 0.5rem 1rem;
     border-radius: 20px;
}
}
pre code { background: none; color: inherit; padding: 0; }


/* 板块标题 */
/* ---------- UI 区域:导航/侧边栏更轻 ---------- */
.section-heading {
#mw-panel, #p-personal, #left-navigation, #right-navigation,
     font-size: 1.4rem;
.vector-menu, .mw-ui-button, .mw-ui-input,
     font-weight: 600;
.skin-vector-2022 .vector-menu-tabs,
     margin: 2rem 0 1rem;
.skin-timeless .portlet {
    padding-bottom: 0.5rem;
     font-family: "Inter", "Noto Sans SC", "PingFang SC",
     border-bottom: 2px solid #e5e7eb;
                "Microsoft YaHei", system-ui, sans-serif;
     font-size: 14px;
     font-weight: 500;
     color: #374151;
}
}


/* 三大支柱网格 */
/* 侧边栏标题弱化 */
.pillars-grid {
.vector-menu-portal h3,
    display: grid;
#mw-panel .portal h3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
     font-size: 12px;
    gap: 1.5rem;
     text-transform: uppercase;
    margin-bottom: 2rem;
     letter-spacing: 0.06em;
}
     color: #9ca3af;
 
/* 支柱卡片 */
.pillar-card {
     border: 1px solid #e5e7eb;
    border-radius: 12px;
     padding: 1.75rem 1.5rem;
    background: #fff;
    transition: box-shadow 0.2s, transform 0.2s;
    display: flex;
     flex-direction: column;
}
.pillar-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
     transform: translateY(-2px);
}
.pillar-icon {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
}
.pillar-title {
    font-size: 1.25rem;
     font-weight: 600;
     font-weight: 600;
    margin-bottom: 0.5rem;
}
.pillar-title a {
    text-decoration: none;
    color: inherit;
}
.pillar-desc {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.5;
    flex-grow: 1;
    margin-bottom: 1.25rem;
}
.pillar-meta {
    font-size: 0.85rem;
    color: #9ca3af;
    margin-bottom: 1rem;
}
.pillar-link {
    align-self: flex-start;
    background: #2563eb;
    color: #fff !important;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s;
}
.pillar-link:hover {
    background: #1d4ed8;
}
}


/* 随机翻翻按钮 */
/* ---------- 引用块:现代卡片感 ---------- */
.random-section {
blockquote {
     text-align: center;
     font-family: inherit;       /* 跟正文同族,不再斜体衬线 */
     margin: 2.5rem 0;
     font-style: normal;
}
    border-left: 3px solid #3b82f6;
.random-btn {
     background: #f8fafc;
    display: inline-block;
     color: #334155;
     background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
     padding: 0.6em 1em;
     color: #fff !important;
     margin: 1em 0;
     padding: 0.875rem 2.5rem;
     border-radius: 0 6px 6px 0;
     border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}
.random-btn:hover {
    transform: scale(1.05);
     box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}
}


/* 双栏区域 */
/* ---------- 表格:去厚重边框 ---------- */
.two-column {
table.wikitable {
     display: grid;
     border-collapse: collapse;
     grid-template-columns: 1fr 1fr;
     font-size: 0.95em;
    gap: 1.5rem;
    margin-bottom: 2rem;
}
}
@media (max-width: 768px) {
table.wikitable > * > tr > th {
     .two-column {
     background: #f8fafc;
        grid-template-columns: 1fr;
    }
}
 
/* 栏目盒子 */
.column-box {
     border: 1px solid #e5e7eb;
     border: 1px solid #e5e7eb;
    border-radius: 12px;
     padding: 0.5em 0.75em;
     padding: 1.5rem;
    background: #fff;
}
.column-title {
    font-size: 1.1rem;
     font-weight: 600;
     font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
}
 
table.wikitable > * > tr > td {
/* 精选文章 */
     border: 1px solid #eef0f2;
.featured-article {
     padding: 0.5em 0.75em;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
     border-left: 4px solid #0ea5e9;
     padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}
.featured-article:last-of-type {
    margin-bottom: 0;
}
.featured-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.featured-title a {
    color: #0369a1;
    text-decoration: none;
}
.featured-title a:hover {
    text-decoration: underline;
}
.featured-desc {
    font-size: 0.85rem;
    color: #64748b;
}
}


/* 数据面板 */
/* ---------- 数学公式对齐 ---------- */
.stats-panel {
.mwe-math-element {
    background: #f8fafc;
     font-size: 1.02em;
    border-radius: 12px;
     vertical-align: middle;
    padding: 1.5rem;
    margin-bottom: 2rem;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}
.stat-item {
    text-align: center;
    padding: 1rem 0.5rem;
    background: #fff;
    border-radius: 8px;
}
.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
}
.stat-label {
     font-size: 0.85rem;
    color: #64748b;
     margin-top: 0.25rem;
}
}


/* 此刻在折腾 */
/* ---------- Minerva 移动端兜底(避免被移动皮肤覆盖回衬线) ---------- */
.status-section {
.skin-minerva body,
    background: #fefce8;
.skin-minerva .content {
    border-radius: 12px;
     font-family: "Inter", "Noto Sans SC", "PingFang SC",
    padding: 1.5rem;
                "HarmonyOS Sans SC", system-ui, sans-serif !important;
     margin-bottom: 2rem;
     line-height: 1.7;
    border-left: 4px solid #eab308;
}
.status-section .section-heading {
    border: none;
     margin: 0 0 0.75rem 0;
}
}
.status-item {
.skin-minerva h1, .skin-minerva h2, .skin-minerva h3 {
    margin-bottom: 0.5rem;
     font-family: inherit !important;
    font-size: 0.95rem;
     letter-spacing: -0.01em;
}
.status-item:last-child {
     margin-bottom: 0;
}
.status-icon {
     margin-right: 0.5rem;
}
.status-item a {
    color: #854d0e;
}
}


/* 诗词角落 */
/* ---------- 暗色模式友好(Vector2022 暗色时) ---------- */
.poetry-section {
@media (prefers-color-scheme: dark) {
    border: 1px dashed #d1d5db;
     html, body { color: #e6edf3; }
    border-radius: 12px;
     h1, h2, h3, h4, h5, h6 { color: #f0f6fc; }
    padding: 1.5rem;
     h2 { border-bottom-color: #30363d; }
    margin-bottom: 2rem;
    a { color: #58a6ff; }
    background: #fafafa;
     a:visited { color: #bc8cff; }
}
    code { background: #21262d; color: #ff7b72; }
.poetry-section .mw-collapsible-toggle {
     blockquote { background: #161b22; color: #adbac7; border-left-color: #58a6ff; }
    font-weight: 600;
     table.wikitable > * > tr > th { background: #161b22; }
    color: #6b7280;
}
.poetry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}
.poetry-item {
    font-size: 0.85rem;
     padding: 0.5rem;
     background: #fff;
     border-radius: 6px;
    text-align: center;
}
.poetry-item a {
    color: #7c3aed;
     text-decoration: none;
}
.poetry-item a:hover {
    text-decoration: underline;
}
 
/* 页脚 */
.main-footer {
    text-align: center;
    padding: 2rem;
     color: #9ca3af;
    font-size: 0.85rem;
    border-top: 1px solid #e5e7eb;
     margin-top: 2rem;
}
.main-footer a {
    color: #9ca3af;
}
}

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