MediaWiki:Common.css:修订间差异

来自心灵终结资料站
跳转到导航 跳转到搜索
无编辑摘要
Lyx讨论 | 贡献
无编辑摘要
第1行: 第1行:
/* ====================================================
/* ====================================================
     MediaWiki 现代干练风格 (低圆角、表格强化)
     MediaWiki 现代干练风格 (低圆角、表格强化)
    修复:链接悬浮无双下划线,统一为单底边效果
     适用版本:1.35+ / 1.39+ (Vector 2022 及旧版兼容)
     适用版本:1.35+ / 1.39+ (Vector 2022 及旧版兼容)
    特点:低圆角、硬朗边框、表格阴影与条纹、信息层级清晰
   ==================================================== */
   ==================================================== */


第11行: 第11行:
   line-height: 1.65;
   line-height: 1.65;
   color: #1e293b;
   color: #1e293b;
   background-color: #f1f5f9; /* 浅灰蓝底 */
   background-color: #f1f5f9;
}
}


/* ---------- 内容主容器 (低圆角、清晰边框) ---------- */
/* ---------- 内容主容器 ---------- */
.mw-body {
.mw-body {
   background-color: #ffffff;
   background-color: #ffffff;
   border-radius: 4px;         /* 低圆角,更利落 */
   border-radius: 4px;
   box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
   box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
   padding: 2rem 2.5rem;
   padding: 2rem 2.5rem;
   margin-top: 0.5rem;
   margin-top: 0.5rem;
   border: 1px solid #d1d9e6;   /* 明显边框 */
   border: 1px solid #d1d9e6;
}
}


第34行: 第34行:
h1 {
h1 {
   font-size: 2.2rem;
   font-size: 2.2rem;
   border-bottom: 3px solid #cbd5e1; /* 硬朗底边 */
   border-bottom: 3px solid #cbd5e1;
   padding-bottom: 0.4rem;
   padding-bottom: 0.4rem;
   margin-bottom: 1.2rem;
   margin-bottom: 1.2rem;
第51行: 第51行:
}
}


/* ---------- 链接 ---------- */
/* ====================================================
  链接样式 — 修复双下划线问题
  ==================================================== */
 
/* 基础链接:默认无下划线,仅保留细底边作为预备 */
a {
a {
   color: #1e4f8a; /* 深蓝,更稳重 */
   color: #1e4f8a;
   text-decoration: none;
   text-decoration: none;           /* 去掉所有文字装饰下划线 */
   border-bottom: 1px solid transparent;
   border-bottom: 1px solid transparent;
   transition: border-color 0.1s ease, color 0.1s ease;
   transition: border-color 0.15s ease, color 0.15s ease;
}
}


/* 悬浮时:仅显示一条清晰的底边,无文字下划线 */
a:hover {
a:hover {
   color: #0b2b4a;
   color: #0b2b4a;
   border-bottom-color: #1e4f8a;
   border-bottom-color: #1e4f8a;  /* 仅底边变色,无 text-decoration */
  text-decoration: none;          /* 强制确保无文字下划线 */
}
 
/* 已访问链接保持同样风格 */
a:visited {
  color: #1e4f8a;
}
}


/* ---------- 外部链接 (去掉MediaWiki默认背景图标,保留自定义上标) ---------- */
.mw-body a.external {
.mw-body a.external {
   background: none;
   background: none;
第70行: 第82行:
.mw-body a.external:after {
.mw-body a.external:after {
   content: "↗";
   content: "↗";
   font-size: 0.75em;
   font-size: 0.7em;
   margin-left: 0.2em;
   margin-left: 0.2em;
   opacity: 0.6;
   opacity: 0.6;
  border-bottom: none;            /* 避免图标带下划线 */
}
/* 外部链接悬浮时,图标不带下划线 */
.mw-body a.external:hover:after {
  border-bottom: none;
}
}


/* ---------- 导航与页签 (低圆角) ---------- */
/* ---------- 编辑区内的链接 (如编辑段落的[编辑]按钮) ---------- */
.mw-editsection a {
  background: #e9edf2;
  padding: 0.15rem 0.7rem;
  border-radius: 2px;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  transition: all 0.1s;
  text-decoration: none;          /* 确保无下划线 */
}
 
.mw-editsection a:hover {
  background: #1e4f8a;
  color: white;
  border-color: #1e4f8a;
  border-bottom-color: #1e4f8a;  /* 保持与边框一致 */
  text-decoration: none;
}
 
/* ---------- 导航与页签 ---------- */
.vector-page-tabs .mw-list-item a {
.vector-page-tabs .mw-list-item a {
   border-radius: 2px 2px 0 0;   /* 几乎直角,轻微修饰 */
   border-radius: 2px 2px 0 0;
   padding: 0.6rem 1.2rem;
   padding: 0.6rem 1.2rem;
   font-weight: 500;
   font-weight: 500;
   color: #475569;
   color: #475569;
   transition: background 0.15s;
   transition: background 0.15s;
  text-decoration: none;          /* 导航链接无下划线 */
  border-bottom: none;          /* 导航链接不用底边,用背景区分 */
}
}


第87行: 第126行:
   background: #e9edf2;
   background: #e9edf2;
   color: #0f172a;
   color: #0f172a;
  border-bottom: none;
  text-decoration: none;
}
}


第94行: 第135行:
   border-bottom: 3px solid #1e4f8a;
   border-bottom: 3px solid #1e4f8a;
   font-weight: 600;
   font-weight: 600;
  text-decoration: none;
}
}


/* ---------- 表格美化(核心) ---------- */
/* ---------- 表格美化 ---------- */
.wikitable {
.wikitable {
   border-collapse: collapse;     /* 合并边框,更紧凑 */
   border-collapse: collapse;
   border-radius: 0;             /* 完全直角,硬朗 */
   border-radius: 0;
   box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
   box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
   width: 100%;
   width: 100%;
   background: white;
   background: white;
   border: 1px solid #d1d9e6;     /* 外边框 */
   border: 1px solid #d1d9e6;
   font-size: 0.95rem;
   font-size: 0.95rem;
}
}


/* 表头 */
.wikitable th {
.wikitable th {
   background: #e9edf2;           /* 浅灰蓝 */
   background: #e9edf2;
   color: #0f172a;
   color: #0f172a;
   font-weight: 600;
   font-weight: 600;
   padding: 0.75rem 1rem;
   padding: 0.75rem 1rem;
   border: 1px solid #cbd5e1;     /* 单元格边框 */
   border: 1px solid #cbd5e1;
   text-align: left;
   text-align: left;
   letter-spacing: 0.02em;
   letter-spacing: 0.02em;
}
}


/* 表体单元格 */
.wikitable td {
.wikitable td {
   padding: 0.65rem 1rem;
   padding: 0.65rem 1rem;
   border: 1px solid #d1d9e6;     /* 单元格边框 */
   border: 1px solid #d1d9e6;
   background-color: #ffffff;
   background-color: #ffffff;
}
}


/* 交替行条纹 (斑马线) */
.wikitable tr:nth-child(even) td {
.wikitable tr:nth-child(even) td {
   background-color: #f8fafc;     /* 极浅灰 */
   background-color: #f8fafc;
}
}


/* 行悬停效果 */
.wikitable tr:hover td {
.wikitable tr:hover td {
   background-color: #eef2f7;     /* 浅灰蓝悬停 */
   background-color: #eef2f7;
}
}


/* 表头与表体之间的分隔强调 */
.wikitable thead th {
.wikitable thead th {
   border-bottom-width: 2px;
   border-bottom-width: 2px;
第141行: 第178行:
}
}


/* 表格内特殊状态 (如排序指示) */
.wikitable .sortheader {
.wikitable .sortheader {
   cursor: pointer;
   cursor: pointer;
第149行: 第185行:
}
}


/* ---------- 信息框 (直角风格) ---------- */
/* ---------- 表格内链接 (保持风格统一) ---------- */
.wikitable a {
  border-bottom: 1px solid transparent;
}
.wikitable a:hover {
  border-bottom-color: #1e4f8a;
}
 
/* ---------- 信息框 ---------- */
.infobox {
.infobox {
   background: #f8fafc;
   background: #f8fafc;
   border: 1px solid #cbd5e1;
   border: 1px solid #cbd5e1;
   border-radius: 2px;           /* 低圆角 */
   border-radius: 2px;
   padding: 1rem 1.2rem;
   padding: 1rem 1.2rem;
   box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
   box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
第183行: 第227行:
}
}


/* ---------- 引用与参考文献 ---------- */
/* ---------- 引用 ---------- */
ol.references {
ol.references {
   font-size: 0.9rem;
   font-size: 0.9rem;
   background: #f8fafc;
   background: #f8fafc;
   padding: 0.8rem 1.5rem 0.8rem 2.5rem;
   padding: 0.8rem 1.5rem 0.8rem 2.5rem;
   border-left: 4px solid #94a3b8; /* 硬边指示 */
   border-left: 4px solid #94a3b8;
   border-radius: 0;
   border-radius: 0;
}
}


/* ---------- 消息框 (直角) ---------- */
/* ---------- 消息框 ---------- */
.msgbox, .messagebox {
.msgbox, .messagebox {
   border-radius: 0;             /* 完全直角 */
   border-radius: 0;
   padding: 1rem 1.5rem;
   padding: 1rem 1.5rem;
   background: #f1f5f9;
   background: #f1f5f9;
第232行: 第276行:
}
}


/* ---------- 目录 (TOC) ---------- */
/* ---------- 目录 ---------- */
#toc {
#toc {
   background: #f8fafc;
   background: #f8fafc;
第256行: 第300行:
   margin: 0 0 0.5rem 0;
   margin: 0 0 0.5rem 0;
   display: inline-block;
   display: inline-block;
}
/* ---------- 目录内链接 ---------- */
#toc a {
  border-bottom: 1px solid transparent;
}
#toc a:hover {
  border-bottom-color: #1e4f8a;
}
}


第270行: 第322行:
   border: 1px solid #cbd5e1;
   border: 1px solid #cbd5e1;
   transition: all 0.1s;
   transition: all 0.1s;
  text-decoration: none;
}
}


第276行: 第329行:
   color: white;
   color: white;
   border-color: #1e4f8a;
   border-color: #1e4f8a;
  text-decoration: none;
}
}


第295行: 第349行:
}
}


/* ---------- 滚动条 (硬朗风格) ---------- */
/* ---------- 滚动条 ---------- */
::-webkit-scrollbar {
::-webkit-scrollbar {
   width: 10px;
   width: 10px;
第326行: 第380行:
   .wikitable th {
   .wikitable th {
     background: #eee !important;
     background: #eee !important;
  }
  a {
    border-bottom: 1px dotted #999 !important;
  }
  a:hover {
    border-bottom-color: #999 !important;
   }
   }
}
}

2026年8月19日 (三) 02:52的版本

/* ====================================================
    MediaWiki 现代干练风格 (低圆角、表格强化)
    修复:链接悬浮无双下划线,统一为单底边效果
    适用版本:1.35+ / 1.39+ (Vector 2022 及旧版兼容)
   ==================================================== */

/* ---------- 基础排版 ---------- */
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: #1e293b;
  background-color: #f1f5f9;
}

/* ---------- 内容主容器 ---------- */
.mw-body {
  background-color: #ffffff;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  padding: 2rem 2.5rem;
  margin-top: 0.5rem;
  border: 1px solid #d1d9e6;
}

/* ---------- 标题与层级 ---------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: #0f172a;
}

h1 {
  font-size: 2.2rem;
  border-bottom: 3px solid #cbd5e1;
  padding-bottom: 0.4rem;
  margin-bottom: 1.2rem;
}

h2 {
  font-size: 1.7rem;
  border-bottom: 2px solid #d1d9e6;
  padding-bottom: 0.3rem;
  margin-top: 2rem;
}

h3 {
  font-size: 1.3rem;
  font-weight: 600;
}

/* ====================================================
   链接样式 — 修复双下划线问题
   ==================================================== */

/* 基础链接:默认无下划线,仅保留细底边作为预备 */
a {
  color: #1e4f8a;
  text-decoration: none;           /* 去掉所有文字装饰下划线 */
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

/* 悬浮时:仅显示一条清晰的底边,无文字下划线 */
a:hover {
  color: #0b2b4a;
  border-bottom-color: #1e4f8a;   /* 仅底边变色,无 text-decoration */
  text-decoration: none;           /* 强制确保无文字下划线 */
}

/* 已访问链接保持同样风格 */
a:visited {
  color: #1e4f8a;
}

/* ---------- 外部链接 (去掉MediaWiki默认背景图标,保留自定义上标) ---------- */
.mw-body a.external {
  background: none;
  padding-right: 0;
}
.mw-body a.external:after {
  content: "↗";
  font-size: 0.7em;
  margin-left: 0.2em;
  opacity: 0.6;
  border-bottom: none;            /* 避免图标带下划线 */
}

/* 外部链接悬浮时,图标不带下划线 */
.mw-body a.external:hover:after {
  border-bottom: none;
}

/* ---------- 编辑区内的链接 (如编辑段落的[编辑]按钮) ---------- */
.mw-editsection a {
  background: #e9edf2;
  padding: 0.15rem 0.7rem;
  border-radius: 2px;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  transition: all 0.1s;
  text-decoration: none;          /* 确保无下划线 */
}

.mw-editsection a:hover {
  background: #1e4f8a;
  color: white;
  border-color: #1e4f8a;
  border-bottom-color: #1e4f8a;   /* 保持与边框一致 */
  text-decoration: none;
}

/* ---------- 导航与页签 ---------- */
.vector-page-tabs .mw-list-item a {
  border-radius: 2px 2px 0 0;
  padding: 0.6rem 1.2rem;
  font-weight: 500;
  color: #475569;
  transition: background 0.15s;
  text-decoration: none;          /* 导航链接无下划线 */
  border-bottom: none;           /* 导航链接不用底边,用背景区分 */
}

.vector-page-tabs .mw-list-item a:hover {
  background: #e9edf2;
  color: #0f172a;
  border-bottom: none;
  text-decoration: none;
}

.vector-page-tabs .mw-list-item.selected a {
  background: #ffffff;
  color: #1e4f8a;
  border-bottom: 3px solid #1e4f8a;
  font-weight: 600;
  text-decoration: none;
}

/* ---------- 表格美化 ---------- */
.wikitable {
  border-collapse: collapse;
  border-radius: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  width: 100%;
  background: white;
  border: 1px solid #d1d9e6;
  font-size: 0.95rem;
}

.wikitable th {
  background: #e9edf2;
  color: #0f172a;
  font-weight: 600;
  padding: 0.75rem 1rem;
  border: 1px solid #cbd5e1;
  text-align: left;
  letter-spacing: 0.02em;
}

.wikitable td {
  padding: 0.65rem 1rem;
  border: 1px solid #d1d9e6;
  background-color: #ffffff;
}

.wikitable tr:nth-child(even) td {
  background-color: #f8fafc;
}

.wikitable tr:hover td {
  background-color: #eef2f7;
}

.wikitable thead th {
  border-bottom-width: 2px;
  border-bottom-color: #94a3b8;
}

.wikitable .sortheader {
  cursor: pointer;
}
.wikitable .sortheader:hover {
  background: #d1d9e6;
}

/* ---------- 表格内链接 (保持风格统一) ---------- */
.wikitable a {
  border-bottom: 1px solid transparent;
}
.wikitable a:hover {
  border-bottom-color: #1e4f8a;
}

/* ---------- 信息框 ---------- */
.infobox {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 2px;
  padding: 1rem 1.2rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  float: right;
  clear: right;
  margin: 0 0 1rem 1.5rem;
  max-width: 320px;
  width: 100%;
}

.infobox th, .infobox td {
  padding: 0.4rem 0.6rem;
  border: none;
  border-bottom: 1px solid #e2e8f0;
}

.infobox tr:last-child th,
.infobox tr:last-child td {
  border-bottom: none;
}

.infobox .infobox-header {
  font-weight: 700;
  font-size: 1.2rem;
  text-align: center;
  background: #e2e8f0;
  border-radius: 2px;
  padding: 0.3rem 0.5rem;
}

/* ---------- 引用 ---------- */
ol.references {
  font-size: 0.9rem;
  background: #f8fafc;
  padding: 0.8rem 1.5rem 0.8rem 2.5rem;
  border-left: 4px solid #94a3b8;
  border-radius: 0;
}

/* ---------- 消息框 ---------- */
.msgbox, .messagebox {
  border-radius: 0;
  padding: 1rem 1.5rem;
  background: #f1f5f9;
  border-left: 6px solid #64748b;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  margin: 1.2rem 0;
  border-top: 1px solid #d1d9e6;
  border-right: 1px solid #d1d9e6;
  border-bottom: 1px solid #d1d9e6;
}

.msgbox.warning, .messagebox.warning {
  border-left-color: #b45309;
  background: #fffbeb;
}

.msgbox.error, .messagebox.error {
  border-left-color: #b91c1c;
  background: #fef2f2;
}

.msgbox.success, .messagebox.success {
  border-left-color: #15803d;
  background: #f0fdf4;
}

/* ---------- 代码块 ---------- */
pre, .mw-code {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 2px;
  padding: 1rem 1.5rem;
  font-family: "JetBrains Mono", "Fira Code", monospace;
  font-size: 0.9rem;
  overflow-x: auto;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.02);
}

/* ---------- 目录 ---------- */
#toc {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 2px;
  padding: 0.8rem 1.5rem;
  display: inline-block;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

#toc ul {
  margin-left: 0.5rem;
}

#toc li {
  list-style: none;
  padding: 0.15rem 0;
}

.toctitle h2 {
  font-size: 1.1rem;
  border-bottom: none;
  margin: 0 0 0.5rem 0;
  display: inline-block;
}

/* ---------- 目录内链接 ---------- */
#toc a {
  border-bottom: 1px solid transparent;
}
#toc a:hover {
  border-bottom-color: #1e4f8a;
}

/* ---------- 编辑按钮 ---------- */
.mw-editsection {
  font-size: 0.8rem;
}

.mw-editsection a {
  background: #e9edf2;
  padding: 0.15rem 0.7rem;
  border-radius: 2px;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  transition: all 0.1s;
  text-decoration: none;
}

.mw-editsection a:hover {
  background: #1e4f8a;
  color: white;
  border-color: #1e4f8a;
  text-decoration: none;
}

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
  .mw-body {
    padding: 1rem 1.2rem;
    border-radius: 2px;
  }
  
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }
  
  .infobox {
    float: none;
    margin: 1rem auto;
    max-width: 100%;
  }
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: #e2e8f0;
  border-radius: 0;
}
::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 0;
  border: 1px solid #64748b;
}
::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* ---------- 打印 ---------- */
@media print {
  .mw-body {
    box-shadow: none;
    border: 1px solid #ccc;
    padding: 0.5rem;
  }
  .wikitable {
    box-shadow: none;
    border: 1px solid #999;
  }
  .wikitable th {
    background: #eee !important;
  }
  a {
    border-bottom: 1px dotted #999 !important;
  }
  a:hover {
    border-bottom-color: #999 !important;
  }
}