跳转到内容

MediaWiki:Common.css:修订间差异

来自槌基百科
Full rewrite: remove old global infobox block, Classic=Wikipedia style, themes=modern card
Fix infobox: use explicit .theme-* class names, not [class*=theme-] which matched skin-theme-clientpref-day
第23行: 第23行:
/* ═══════════════════════════════════════════════════════════════════
/* ═══════════════════════════════════════════════════════════════════
   CHARACTER INFOBOX
   CHARACTER INFOBOX
  NOTE: we use explicit class names (.theme-slate/.theme-dark/.theme-warm)
  NOT [class*="theme-"] which falsely matches skin-theme-clientpref-day.
   ═══════════════════════════════════════════════════════════════════ */
   ═══════════════════════════════════════════════════════════════════ */


/* ── Classic (no theme class): Wikipedia style ───────────────────── */
/* ── Classic (no theme class): Wikipedia style ───────────────────── */
html:not([class*="theme-"]) table.infobox.biography {
html:not(.theme-slate):not(.theme-dark):not(.theme-warm) table.infobox.biography {
     background: #f8f9fa !important;
     background: #f8f9fa !important;
     border: 1px solid #a2a9b1 !important;
     border: 1px solid #a2a9b1 !important;
第40行: 第42行:
     padding: 3px !important;
     padding: 3px !important;
}
}
html:not([class*="theme-"]) table.infobox.biography > caption {
html:not(.theme-slate):not(.theme-dark):not(.theme-warm) table.infobox.biography > caption {
     font-size: 125% !important;
     font-size: 125% !important;
     font-weight: bold !important;
     font-weight: bold !important;
第50行: 第52行:
     text-align: center !important;
     text-align: center !important;
}
}
html:not([class*="theme-"]) table.infobox.biography > tbody > tr:first-child > th {
html:not(.theme-slate):not(.theme-dark):not(.theme-warm) table.infobox.biography > tbody > tr:first-child > th {
     background: #cee0f2 !important;
     background: #cee0f2 !important;
     padding: 4px !important;
     padding: 4px !important;
第56行: 第58行:
     text-align: center !important;
     text-align: center !important;
}
}
html:not([class*="theme-"]) table.infobox.biography > tbody > tr:first-child > th img {
html:not(.theme-slate):not(.theme-dark):not(.theme-warm) table.infobox.biography > tbody > tr:first-child > th img {
     display: inline !important;
     display: inline !important;
     width: auto !important;
     width: auto !important;
第63行: 第65行:
     object-fit: unset !important;
     object-fit: unset !important;
}
}
html:not([class*="theme-"]) table.infobox.biography > tbody > tr > th {
html:not(.theme-slate):not(.theme-dark):not(.theme-warm) table.infobox.biography > tbody > tr > th {
     background: #eaecf0 !important;
     background: #eaecf0 !important;
     color: #000 !important;
     color: #000 !important;
第74行: 第76行:
     border-radius: 0 !important;
     border-radius: 0 !important;
}
}
html:not([class*="theme-"]) table.infobox.biography > tbody > tr > td {
html:not(.theme-slate):not(.theme-dark):not(.theme-warm) table.infobox.biography > tbody > tr > td {
     background: #f8f9fa !important;
     background: #f8f9fa !important;
     color: #000 !important;
     color: #000 !important;
第83行: 第85行:
}
}


/* ── Slate / Dark / Warm: modern card ────────────────────────────── */
/* ── Slate / Dark / Warm: modern rounded card ────────────────────── */
html[class*="theme-"] table.infobox.biography {
html.theme-slate table.infobox.biography,
html.theme-dark table.infobox.biography,
html.theme-warm table.infobox.biography {
     background: #ffffff !important;
     background: #ffffff !important;
     border: none !important;
     border: none !important;
第94行: 第98行:
     width: 240px !important;
     width: 240px !important;
}
}
html[class*="theme-"] table.infobox.biography > caption {
html.theme-slate table.infobox.biography > caption,
html.theme-dark table.infobox.biography > caption,
html.theme-warm table.infobox.biography > caption {
     background: #2c3a4a !important;
     background: #2c3a4a !important;
     color: #fff !important;
     color: #fff !important;
第105行: 第111行:
     text-align: center !important;
     text-align: center !important;
}
}
html[class*="theme-"] table.infobox.biography > tbody > tr:first-child > th {
html.theme-slate table.infobox.biography > tbody > tr:first-child > th,
html.theme-dark table.infobox.biography > tbody > tr:first-child > th,
html.theme-warm table.infobox.biography > tbody > tr:first-child > th {
     background: #3d4f63 !important;
     background: #3d4f63 !important;
     padding: 0 !important;
     padding: 0 !important;
第111行: 第119行:
     text-align: center !important;
     text-align: center !important;
}
}
html[class*="theme-"] table.infobox.biography > tbody > tr:first-child > th img {
html.theme-slate table.infobox.biography > tbody > tr:first-child > th img,
html.theme-dark table.infobox.biography > tbody > tr:first-child > th img,
html.theme-warm table.infobox.biography > tbody > tr:first-child > th img {
     display: block !important; width: 100% !important; height: 200px !important;
     display: block !important; width: 100% !important; height: 200px !important;
     object-fit: cover !important; object-position: top center !important;
     object-fit: cover !important; object-position: top center !important; margin: 0 auto !important;
    margin: 0 auto !important;
}
}
html[class*="theme-"] table.infobox.biography > tbody > tr + tr { border-top: 1px solid #eef0f3; }
html.theme-slate table.infobox.biography > tbody > tr + tr,
html[class*="theme-"] table.infobox.biography > tbody > tr > th {
html.theme-dark table.infobox.biography > tbody > tr + tr,
html.theme-warm table.infobox.biography > tbody > tr + tr { border-top: 1px solid #eef0f3; }
html.theme-slate table.infobox.biography > tbody > tr > th,
html.theme-dark table.infobox.biography > tbody > tr > th,
html.theme-warm table.infobox.biography > tbody > tr > th {
     background: #f7f8fb !important; color: #555 !important; font-weight: 600 !important;
     background: #f7f8fb !important; color: #555 !important; font-weight: 600 !important;
     font-size: 0.88em !important; padding: 0.45em 0.75em !important;
     font-size: 0.88em !important; padding: 0.45em 0.75em !important;
     white-space: nowrap; width: 38%; vertical-align: middle;
     white-space: nowrap; width: 38%; vertical-align: middle;
}
}
html[class*="theme-"] table.infobox.biography > tbody > tr > td {
html.theme-slate table.infobox.biography > tbody > tr > td,
html.theme-dark table.infobox.biography > tbody > tr > td,
html.theme-warm table.infobox.biography > tbody > tr > td {
     background: #ffffff !important; color: #222 !important;
     background: #ffffff !important; color: #222 !important;
     padding: 0.45em 0.75em !important; font-size: 0.9em !important; vertical-align: middle;
     padding: 0.45em 0.75em !important; font-size: 0.9em !important; vertical-align: middle;
}
}
/* Dark overrides */
html.theme-dark table.infobox.biography > tbody > tr > th { background: #252836 !important; color: #a0aec0 !important; }
html.theme-dark table.infobox.biography > tbody > tr > th { background: #252836 !important; color: #a0aec0 !important; }
html.theme-dark table.infobox.biography > tbody > tr > td { background: #1a1d27 !important; color: #e2e8f0 !important; }
html.theme-dark table.infobox.biography > tbody > tr > td { background: #1a1d27 !important; color: #e2e8f0 !important; }
html.theme-dark table.infobox.biography > tbody > tr + tr { border-top: 1px solid #2d3748; }
html.theme-dark table.infobox.biography > tbody > tr + tr { border-top: 1px solid #2d3748; }
/* Warm overrides */
html.theme-warm table.infobox.biography > caption { background: #7a4f1d !important; }
html.theme-warm table.infobox.biography > caption { background: #7a4f1d !important; }
html.theme-warm table.infobox.biography > tbody > tr:first-child > th { background: #9c6b2e !important; }
html.theme-warm table.infobox.biography > tbody > tr:first-child > th { background: #9c6b2e !important; }
第136行: 第153行:


/* ═══════════════════════════════════════════════════════════════════
/* ═══════════════════════════════════════════════════════════════════
   THEME SYSTEM —  applied via <html class="theme-{name}">
   THEME SYSTEM
   ═══════════════════════════════════════════════════════════════════ */
   ═══════════════════════════════════════════════════════════════════ */
html.theme-slate body { background-color: #eef0f4 !important; }
html.theme-slate body { background-color: #eef0f4 !important; }

2026年3月12日 (四) 11:11的版本

/* ── ConfirmAccount: hide unused fields ──────────────────────────── */
#wpRealName, label[for="wpRealName"],
#wpCV, label[for="wpCV"],
#wpNotes, label[for="wpNotes"],
#wpSites, label[for="wpSites"],
#wpTermsBox, label[for="wpTermsBox"],
#mw-confirmaccount-info, #mw-confirmaccount-terms { display: none !important; }
#wpBio { height: 2em !important; }
#mw-confirmaccount-bio > p { display: none !important; }
fieldset:has(legend#mw-confirmaccount-attach) { display: none !important; }

/* ── AllPages: 4-column layout ───────────────────────────────────── */
.mw-allpages-body { column-count: 1 !important; }
.mw-allpages-chunk { column-count: 4; column-gap: 1.5em; list-style: none; padding: 0; }
.mw-allpages-chunk li { break-inside: avoid; padding: 0.15em 0; }
@media (max-width: 900px) { .mw-allpages-chunk { column-count: 2; } }
@media (max-width: 500px) { .mw-allpages-chunk { column-count: 1; } }

/* ── Shared: section-edit pill ───────────────────────────────────── */
.mw-editsection { font-size: 0.75em; background: #f0f4f8; border-radius: 4px; padding: 0 0.4em; }
.mw-editsection a { color: #4a7fa5 !important; }

/* ═══════════════════════════════════════════════════════════════════
   CHARACTER INFOBOX
   NOTE: we use explicit class names (.theme-slate/.theme-dark/.theme-warm)
   NOT [class*="theme-"] which falsely matches skin-theme-clientpref-day.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Classic (no theme class): Wikipedia style ───────────────────── */
html:not(.theme-slate):not(.theme-dark):not(.theme-warm) table.infobox.biography {
    background: #f8f9fa !important;
    border: 1px solid #a2a9b1 !important;
    border-spacing: 3px !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    width: 22em !important;
    font-size: 88% !important;
    line-height: 1.6 !important;
    float: right !important;
    clear: right !important;
    margin: 0 0 1em 1em !important;
    padding: 3px !important;
}
html:not(.theme-slate):not(.theme-dark):not(.theme-warm) table.infobox.biography > caption {
    font-size: 125% !important;
    font-weight: bold !important;
    padding: 4px !important;
    color: #000 !important;
    background: none !important;
    border-radius: 0 !important;
    letter-spacing: normal !important;
    text-align: center !important;
}
html:not(.theme-slate):not(.theme-dark):not(.theme-warm) table.infobox.biography > tbody > tr:first-child > th {
    background: #cee0f2 !important;
    padding: 4px !important;
    border-radius: 0 !important;
    text-align: center !important;
}
html:not(.theme-slate):not(.theme-dark):not(.theme-warm) table.infobox.biography > tbody > tr:first-child > th img {
    display: inline !important;
    width: auto !important;
    height: auto !important;
    max-width: 200px !important;
    object-fit: unset !important;
}
html:not(.theme-slate):not(.theme-dark):not(.theme-warm) table.infobox.biography > tbody > tr > th {
    background: #eaecf0 !important;
    color: #000 !important;
    font-weight: bold !important;
    font-size: 1em !important;
    padding: 3px 6px !important;
    vertical-align: top !important;
    white-space: nowrap !important;
    width: auto !important;
    border-radius: 0 !important;
}
html:not(.theme-slate):not(.theme-dark):not(.theme-warm) table.infobox.biography > tbody > tr > td {
    background: #f8f9fa !important;
    color: #000 !important;
    padding: 3px 6px !important;
    font-size: 1em !important;
    vertical-align: top !important;
    border-radius: 0 !important;
}

/* ── Slate / Dark / Warm: modern rounded card ────────────────────── */
html.theme-slate table.infobox.biography,
html.theme-dark table.infobox.biography,
html.theme-warm table.infobox.biography {
    background: #ffffff !important;
    border: none !important;
    border-radius: 14px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,.18) !important;
    border-spacing: 0 !important;
    overflow: hidden;
    margin: 0 0 1.2em 1.5em !important;
    width: 240px !important;
}
html.theme-slate table.infobox.biography > caption,
html.theme-dark table.infobox.biography > caption,
html.theme-warm table.infobox.biography > caption {
    background: #2c3a4a !important;
    color: #fff !important;
    font-size: 1.15em !important;
    font-weight: 700 !important;
    padding: 0.55em 0.8em !important;
    letter-spacing: 0.04em;
    border-radius: 14px 14px 0 0;
    caption-side: top;
    text-align: center !important;
}
html.theme-slate table.infobox.biography > tbody > tr:first-child > th,
html.theme-dark table.infobox.biography > tbody > tr:first-child > th,
html.theme-warm table.infobox.biography > tbody > tr:first-child > th {
    background: #3d4f63 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    text-align: center !important;
}
html.theme-slate table.infobox.biography > tbody > tr:first-child > th img,
html.theme-dark table.infobox.biography > tbody > tr:first-child > th img,
html.theme-warm table.infobox.biography > tbody > tr:first-child > th img {
    display: block !important; width: 100% !important; height: 200px !important;
    object-fit: cover !important; object-position: top center !important; margin: 0 auto !important;
}
html.theme-slate table.infobox.biography > tbody > tr + tr,
html.theme-dark table.infobox.biography > tbody > tr + tr,
html.theme-warm table.infobox.biography > tbody > tr + tr { border-top: 1px solid #eef0f3; }
html.theme-slate table.infobox.biography > tbody > tr > th,
html.theme-dark table.infobox.biography > tbody > tr > th,
html.theme-warm table.infobox.biography > tbody > tr > th {
    background: #f7f8fb !important; color: #555 !important; font-weight: 600 !important;
    font-size: 0.88em !important; padding: 0.45em 0.75em !important;
    white-space: nowrap; width: 38%; vertical-align: middle;
}
html.theme-slate table.infobox.biography > tbody > tr > td,
html.theme-dark table.infobox.biography > tbody > tr > td,
html.theme-warm table.infobox.biography > tbody > tr > td {
    background: #ffffff !important; color: #222 !important;
    padding: 0.45em 0.75em !important; font-size: 0.9em !important; vertical-align: middle;
}
/* Dark overrides */
html.theme-dark table.infobox.biography > tbody > tr > th { background: #252836 !important; color: #a0aec0 !important; }
html.theme-dark table.infobox.biography > tbody > tr > td { background: #1a1d27 !important; color: #e2e8f0 !important; }
html.theme-dark table.infobox.biography > tbody > tr + tr { border-top: 1px solid #2d3748; }
/* Warm overrides */
html.theme-warm table.infobox.biography > caption { background: #7a4f1d !important; }
html.theme-warm table.infobox.biography > tbody > tr:first-child > th { background: #9c6b2e !important; }
html.theme-warm table.infobox.biography > tbody > tr > th { background: #f5ede0 !important; color: #6b4c1e !important; }
html.theme-warm table.infobox.biography > tbody > tr > td { background: #faf6ef !important; color: #3d2b0f !important; }
html.theme-warm table.infobox.biography > tbody > tr + tr { border-top: 1px solid #e8dcc8; }

/* ═══════════════════════════════════════════════════════════════════
   THEME SYSTEM
   ═══════════════════════════════════════════════════════════════════ */
html.theme-slate body { background-color: #eef0f4 !important; }
html.theme-slate #content, html.theme-slate .mw-body {
    background: #fff; border-radius: 10px; box-shadow: 0 2px 12px rgba(0,0,0,.09);
    border: none !important; padding: 1.8em 2em !important; margin-top: .8em; }
html.theme-slate h1.firstHeading, html.theme-slate #firstHeading {
    font-size: 1.9em; font-weight: 800; color: #2c3a4a;
    border-bottom: 3px solid #4a7fa5 !important; padding-bottom: .3em; margin-bottom: .7em; }
html.theme-slate .mw-body-content h2 {
    font-size: 1.3em; font-weight: 700; color: #2c3a4a; border-bottom: none !important;
    border-left: 4px solid #4a7fa5; padding: .25em 0 .25em .65em; margin: 1.4em 0 .6em;
    background: #f7f8fb; border-radius: 0 6px 6px 0; }
html.theme-slate .mw-body-content h3 { font-size: 1.1em; font-weight: 700; color: #2c3a4a; border-bottom: 1px solid #e0e4ea !important; padding-bottom: .2em; }
html.theme-slate .mw-body-content p { line-height: 1.8; color: #1f2937; }
html.theme-slate .mw-body-content a { color: #3671b5; }
html.theme-slate .mw-body-content a:hover { color: #2c3a4a; }
html.theme-slate .mw-table-of-contents, html.theme-slate #toc, html.theme-slate .toc {
    background: #f7f8fb; border: 1px solid #e0e4ea !important; border-radius: 10px; padding: .8em 1.2em !important; box-shadow: 0 1px 6px rgba(0,0,0,.06); }
html.theme-slate .mw-body-content table:not(.infobox) th { background: #2c3a4a !important; color: #fff !important; padding: .5em .8em !important; }
html.theme-slate .mw-body-content table:not(.infobox) td { padding: .45em .8em !important; border-bottom: 1px solid #e0e4ea; }
html.theme-slate .mw-body-content table:not(.infobox) tr:nth-child(even) td { background: #f7f8fb; }
html.theme-slate .mw-body-content blockquote { border-left: 4px solid #4a7fa5; background: #f7f8fb; padding: .6em 1em; border-radius: 0 6px 6px 0; font-style: italic; }
html.theme-slate .cdx-search-input__input { border-radius: 20px !important; }

html.theme-dark body { background-color: #0f1117 !important; color: #e2e8f0 !important; }
html.theme-dark #content, html.theme-dark .mw-body {
    background: #1a1d27 !important; border-radius: 10px; box-shadow: 0 2px 16px rgba(0,0,0,.5);
    border: 1px solid #2d3748 !important; padding: 1.8em 2em !important; color: #e2e8f0; }
html.theme-dark h1.firstHeading, html.theme-dark #firstHeading { font-size: 1.9em; font-weight: 800; color: #e2e8f0; border-bottom: 3px solid #4a9edd !important; padding-bottom: .3em; }
html.theme-dark .mw-body-content h2 { font-size: 1.3em; font-weight: 700; color: #e2e8f0; border-bottom: none !important; border-left: 4px solid #4a9edd; padding: .25em 0 .25em .65em; margin: 1.4em 0 .6em; background: #252836; border-radius: 0 6px 6px 0; }
html.theme-dark .mw-body-content h3 { color: #cbd5e0; border-bottom: 1px solid #2d3748 !important; padding-bottom: .2em; }
html.theme-dark .mw-body-content p { line-height: 1.8; color: #cbd5e0; }
html.theme-dark .mw-body-content a { color: #63b3ed; }
html.theme-dark .mw-body-content a:hover { color: #90cdf4; }
html.theme-dark .mw-body-content a.new { color: #fc8181; }
html.theme-dark .mw-table-of-contents, html.theme-dark #toc, html.theme-dark .toc { background: #252836; border: 1px solid #2d3748 !important; border-radius: 10px; padding: .8em 1.2em !important; color: #e2e8f0; }
html.theme-dark .mw-body-content table:not(.infobox) th { background: #2d3748 !important; color: #e2e8f0 !important; padding: .5em .8em !important; }
html.theme-dark .mw-body-content table:not(.infobox) td { background: #1a1d27; color: #cbd5e0; padding: .45em .8em !important; border-bottom: 1px solid #2d3748; }
html.theme-dark .mw-body-content table:not(.infobox) tr:nth-child(even) td { background: #252836; }
html.theme-dark .mw-body-content blockquote { border-left: 4px solid #4a9edd; background: #252836; padding: .6em 1em; border-radius: 0 6px 6px 0; color: #a0aec0; }
html.theme-dark .vector-menu-content-list a { color: #90cdf4 !important; }
html.theme-dark .cdx-search-input__input { background: #252836 !important; border-color: #4a5568 !important; color: #e2e8f0 !important; border-radius: 20px !important; }

html.theme-warm body { background-color: #f0ebe0 !important; }
html.theme-warm #content, html.theme-warm .mw-body { background: #faf6ef !important; border-radius: 10px; box-shadow: 0 2px 12px rgba(120,90,40,.12); border: 1px solid #e8dcc8 !important; padding: 1.8em 2em !important; }
html.theme-warm h1.firstHeading, html.theme-warm #firstHeading { font-size: 1.9em; font-weight: 800; color: #5c3d11; border-bottom: 3px solid #c8922a !important; padding-bottom: .3em; }
html.theme-warm .mw-body-content h2 { font-size: 1.3em; font-weight: 700; color: #5c3d11; border-bottom: none !important; border-left: 4px solid #c8922a; padding: .25em 0 .25em .65em; margin: 1.4em 0 .6em; background: #f5ede0; border-radius: 0 6px 6px 0; }
html.theme-warm .mw-body-content h3 { color: #6b4c1e; border-bottom: 1px solid #e8dcc8 !important; padding-bottom: .2em; }
html.theme-warm .mw-body-content p { line-height: 1.8; color: #3d2b0f; }
html.theme-warm .mw-body-content a { color: #9c6b1e; }
html.theme-warm .mw-body-content a:hover { color: #5c3d11; }
html.theme-warm .mw-table-of-contents, html.theme-warm #toc, html.theme-warm .toc { background: #f5ede0; border: 1px solid #e8dcc8 !important; border-radius: 10px; padding: .8em 1.2em !important; }
html.theme-warm .mw-body-content table:not(.infobox) th { background: #7a4f1d !important; color: #fff !important; padding: .5em .8em !important; }
html.theme-warm .mw-body-content table:not(.infobox) td { padding: .45em .8em !important; border-bottom: 1px solid #e8dcc8; }
html.theme-warm .mw-body-content table:not(.infobox) tr:nth-child(even) td { background: #f5ede0; }
html.theme-warm .mw-body-content blockquote { border-left: 4px solid #c8922a; background: #f5ede0; padding: .6em 1em; border-radius: 0 6px 6px 0; font-style: italic; color: #6b4c1e; }
html.theme-warm .cdx-search-input__input { border-radius: 20px !important; border-color: #e8dcc8 !important; }