跳转到内容

MediaWiki:Common.css

来自休伯利安数据库
Plmxs42​(留言 | 贡献)2026年11月6日 (五) 20:33的版本

注意:在发布之后,您可能需要清除浏览器缓存才能看到所作出的更改的影响。

  • Firefox或Safari:按住Shift的同时单击刷新,或按Ctrl-F5或Ctrl-R(Mac为⌘-R)
  • Google Chrome:按Ctrl-Shift-R(Mac为⌘-Shift-R)
  • Edge:按住Ctrl的同时单击刷新,或按Ctrl-F5。
/* ===== 时间线网格行 ===== */
.tl-head,.tl-row{display:grid;grid-template-columns:minmax(7em,max-content) 1fr 9em;gap:8px;padding:7px 8px;box-sizing:border-box}

.tl-head{font-weight:600;background:#eaecf0;border-bottom:1px solid #c8ccd1}
.tl-row{border-bottom:1px solid #eaecf0}
.tl-row:hover{background:#f8f9fa}
.tl-time{white-space:nowrap}
.tl-todo{color:#ac6600}

/* ===== 事件信息框 ===== */
div.event-infobox{float:right;clear:right;width:300px;max-width:100%;box-sizing:border-box;margin:0 0 1em 1.5em;border:1px solid #c8ccd1;background:#f8f9fa;font-size:0.9em;line-height:1.5}
div.event-infobox .ei-title{background:#eaecf0;border-bottom:1px solid #c8ccd1;padding:8px 10px;font-weight:bold;text-align:center}
div.event-infobox .ei-row{display:flex;border-top:1px solid #eaecf0}
div.event-infobox .ei-row:first-child{border-top:0}
div.event-infobox .ei-label{flex:0 0 5.5em;padding:6px 8px;background:#f1f3f5;font-weight:bold;color:#54595d}
div.event-infobox .ei-value{flex:1 1 auto;min-width:0;padding:6px 8px;word-break:break-word}

/* ===== 手机端 ===== */
@media screen and (max-width:720px){
 .tl-head{display:none}
 .tl-row{grid-template-columns:1fr;gap:2px;padding:10px 8px}
 .tl-time{font-size:.9em;color:#54595d}
 div.event-infobox{float:none !important;clear:both;width:auto !important;max-width:100% !important;margin:0 0 1em 0 !important}
 div.event-infobox .ei-label{flex:0 0 4.5em}
}

/* ===== 暗色 ===== */
html.skin-theme-clientpref-night div.event-infobox{background:#27292d;border-color:#54595d}
html.skin-theme-clientpref-night div.event-infobox .ei-title{background:#3c4043;border-color:#54595d}
html.skin-theme-clientpref-night div.event-infobox .ei-label{background:#33363a;color:#c8ccd1}
html.skin-theme-clientpref-night div.event-infobox .ei-row{border-color:#3c4043}
html.skin-theme-clientpref-night .tl-row{border-color:#3c4043}
html.skin-theme-clientpref-night .tl-head{background:#3c4043}
.tl-same{color:#72777d}
/* ===== 提示框(Template:提示框)开始 ===== */
.tipbox {
    border: 1px solid #a2a9b1;
    border-left: 4px solid #54595d;
    border-radius: 3px;
    padding: 0.5em 0.9em 0.6em;
    margin: 0.6em 0;
    clear: both;
    overflow-wrap: break-word;
}
.tipbox-title {
    font-weight: 700;
    margin: 0 0 0.3em;
    overflow-wrap: break-word;
}
.tipbox-body {
    line-height: 1.65;
    overflow-wrap: break-word;
}
.tipbox-notice {
    border-left-color: #3366cc;
    background-color: #eaf3fb;
}
.tipbox-warn {
    border-left-color: #ffcc33;
    background-color: #fdf6e3;
}

/* 强制夜间模式 */
html.skin-theme-clientpref-night .tipbox {
    border-color: #54595d;
    background-color: #1c1f24;
}
html.skin-theme-clientpref-night .tipbox-title,
html.skin-theme-clientpref-night .tipbox-body {
    color: #eaecf0;
}
html.skin-theme-clientpref-night .tipbox-notice {
    border-left-color: #5e96dc;
    background-color: #1a2430;
}
html.skin-theme-clientpref-night .tipbox-warn {
    border-left-color: #d9b036;
    background-color: #2b2617;
}

/* 跟随系统夜间模式 */
@media (prefers-color-scheme: dark) {
    html.skin-theme-clientpref-os .tipbox {
        border-color: #54595d;
        background-color: #1c1f24;
    }
    html.skin-theme-clientpref-os .tipbox-title,
    html.skin-theme-clientpref-os .tipbox-body {
        color: #eaecf0;
    }
    html.skin-theme-clientpref-os .tipbox-notice {
        border-left-color: #5e96dc;
        background-color: #1a2430;
    }
    html.skin-theme-clientpref-os .tipbox-warn {
        border-left-color: #d9b036;
        background-color: #2b2617;
    }
}
/* ===== 提示框(Template:提示框)结束 ===== */
/* ===== 时间线 v2(2026-11)追加块 ===== */

/* 1. 列宽:来源列加宽,长出处不再折成三行 */
.tl-head,.tl-row{grid-template-columns:minmax(7em,max-content) 1fr minmax(10em,16em)}

/* 2. 单元格内多段落/多行 */
.tl-event{line-height:1.7}
.tl-event p,.tl-source p{margin:0 0 .5em}
.tl-event p:last-child,.tl-source p:last-child{margin-bottom:0}

/* 3. 附注(事件下方的灰色小字) */
.tl-note{margin-top:.45em;padding-left:.6em;border-left:2px solid #d6d9dd;color:#54595d;font-size:.88em;line-height:1.6}

/* 4. 角标 */
.tl-tag{display:inline-block;margin-right:.45em;padding:0 .4em;border-radius:2px;background:#eaf3fb;color:#3366cc;font-size:.78em;font-weight:700;vertical-align:.08em;white-space:nowrap}
.tl-tag-warn{background:#fdf6e3;color:#8a5b00}

/* 5. 同一年:年份变灰、行间分隔线变淡,视觉上并成一组 */
.tl-same{color:#a2a9b1;font-size:.94em}
.tl-row-same{border-bottom-color:#f1f3f5}

/* 6. 来源列字号收紧 */
.tl-source{font-size:.92em;line-height:1.55}

/* 7. 桌面端行距微调 */
.tl-row{padding:9px 8px}

/* 8. 移动端 */
@media screen and (max-width:720px){
  .tl-head{display:none}
  .tl-row{grid-template-columns:1fr;gap:0;padding:13px 10px}
  .tl-time{font-size:.85em;color:#72777d;margin-bottom:.3em}
  .tl-row-same{padding-top:6px;border-bottom-color:#f1f3f5}
  .tl-row-same .tl-time{font-size:.8em}
  .tl-event{font-size:.95em}
  .tl-source{margin-top:.4em;font-size:.85em;color:#72777d}
  .tl-source::before{content:"来源:";color:#a2a9b1}
  .tl-note{font-size:.85em}
}

/* 9. 夜间模式 */
html.skin-theme-clientpref-night .tl-note{border-left-color:#54595d;color:#c8ccd1}
html.skin-theme-clientpref-night .tl-tag{background:#1a2430;color:#5e96dc}
html.skin-theme-clientpref-night .tl-tag-warn{background:#2b2617;color:#d9b036}
html.skin-theme-clientpref-night .tl-same{color:#72777d}
html.skin-theme-clientpref-night .tl-row-same{border-bottom-color:#3c4043}
html.skin-theme-clientpref-night .tl-source{color:#c8ccd1}

@media (prefers-color-scheme: dark){
  html.skin-theme-clientpref-os .tl-note{border-left-color:#54595d;color:#c8ccd1}
  html.skin-theme-clientpref-os .tl-tag{background:#1a2430;color:#5e96dc}
  html.skin-theme-clientpref-os .tl-tag-warn{background:#2b2617;color:#d9b036}
  html.skin-theme-clientpref-os .tl-same{color:#72777d}
  html.skin-theme-clientpref-os .tl-row-same{border-bottom-color:#3c4043}
}