MediaWiki:Common.css:修订间差异
外观
LocalAdmin(留言 | 贡献) Fix AllPages columns: reset parent to 1, set ul to 4 |
LocalAdmin(留言 | 贡献) Character infobox: modern card with shadow, rounded corners, better layout |
||
| 第60行: | 第60行: | ||
@media (max-width: 500px) { | @media (max-width: 500px) { | ||
.mw-allpages-chunk { column-count: 1; } | .mw-allpages-chunk { column-count: 1; } | ||
} | |||
/* ── Character infobox: modern card style ───────────────────────── */ | |||
/* Card shell */ | |||
table.infobox.biography { | |||
background: #ffffff !important; | |||
border: none !important; | |||
border-radius: 14px !important; | |||
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18) !important; | |||
border-spacing: 0 !important; | |||
overflow: hidden; | |||
margin: 0 0 1.2em 1.5em !important; | |||
width: 240px !important; | |||
} | |||
/* Character name caption */ | |||
table.infobox.biography > caption { | |||
background: #2c3a4a !important; | |||
color: #ffffff !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; | |||
} | |||
/* Image header row — replace the dated blue with dark neutral */ | |||
table.infobox.biography > tbody > tr:first-child > th { | |||
background: #3d4f63 !important; | |||
padding: 0 !important; | |||
border-radius: 0 !important; | |||
text-align: center !important; | |||
} | |||
/* Image fills the header area */ | |||
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; | |||
} | |||
/* Data rows */ | |||
table.infobox.biography > tbody > tr + tr { | |||
border-top: 1px solid #eef0f3; | |||
} | |||
/* Label cells */ | |||
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; | |||
} | |||
/* Value cells */ | |||
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; | |||
} | |||
/* Last row — round bottom corners */ | |||
table.infobox.biography > tbody > tr:last-child > th, | |||
table.infobox.biography > tbody > tr:last-child > td { | |||
border-radius: 0 0 0 14px; | |||
} | |||
table.infobox.biography > tbody > tr:last-child > td:last-child { | |||
border-radius: 0 0 14px 0; | |||
} | } | ||
2026年3月12日 (四) 10:55的版本
/* 这里放置的CSS将应用于所有皮肤 */
.infobox {
border: 1px solid #aaa;
background-color: #f9f9f9;
color: black;
margin-bottom: 10px;
padding: 15px;
float: right;
clear: right;
}
/* Hide unnecessary ConfirmAccount 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;
}
/* Make biography field one-line */
#wpBio {
height: 2em !important;
}
/* Hide description text below biography label */
#mw-confirmaccount-bio > p {
display: none !important;
}
/* Fully hide the "Other Information" section */
fieldset:has(legend#mw-confirmaccount-attach) {
display: none !important;
}
/* ── AllPages: 4-column layout ─────────────────────────────────────── */
.mw-allpages-body {
column-count: 1 !important; /* neutralise MediaWiki's default 2-col on this wrapper */
}
.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; }
}
/* ── Character infobox: modern card style ───────────────────────── */
/* Card shell */
table.infobox.biography {
background: #ffffff !important;
border: none !important;
border-radius: 14px !important;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18) !important;
border-spacing: 0 !important;
overflow: hidden;
margin: 0 0 1.2em 1.5em !important;
width: 240px !important;
}
/* Character name caption */
table.infobox.biography > caption {
background: #2c3a4a !important;
color: #ffffff !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;
}
/* Image header row — replace the dated blue with dark neutral */
table.infobox.biography > tbody > tr:first-child > th {
background: #3d4f63 !important;
padding: 0 !important;
border-radius: 0 !important;
text-align: center !important;
}
/* Image fills the header area */
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;
}
/* Data rows */
table.infobox.biography > tbody > tr + tr {
border-top: 1px solid #eef0f3;
}
/* Label cells */
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;
}
/* Value cells */
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;
}
/* Last row — round bottom corners */
table.infobox.biography > tbody > tr:last-child > th,
table.infobox.biography > tbody > tr:last-child > td {
border-radius: 0 0 0 14px;
}
table.infobox.biography > tbody > tr:last-child > td:last-child {
border-radius: 0 0 14px 0;
}